asyncapi: 3.0.0
info:
  title: True Markets CeFi WebSocket
  description: >
    ## Overview

    This API allows clients to interact with the **CeFi trading platform** for
    real time instrument, market data and exchange transactions.


    ## Authentication

    Certain API requests must be **authenticated** using **HMAC-SHA256 signature
    authentication**.


    ## Unauthenticated Endpoints

    Many endpoints have an unauthenticated version which only requires the user
    to supply a valid timestamp (no older than 15 seconds and not in the future,
    relative to server UTC time). These endpoints batch updates and publish on
    an interval set by the exchange, typically 1 second.


    ## Authenticated-Only Channels

    Some channels require authentication and cannot be accessed without valid
    credentials:

    - **DROPCOPY**: Order drop copy channel that provides real-time order state
    updates. 


    ## Links

    - 📖 **Full API Documentation**:
    [https://docs.truex.co/](https://docs.truex.co/)

    - 📧 **Support**: [support@truex.co](mailto:support@truex.co)


    ## Change Log

    | Version   | Date       | Notes                                       |

    |-----------|------------|---------------------------------------------|

    | v1.0.3    | 2026-02-23 | Added `UNSUBSCRIBE_NO_AUTH` and clarified no-auth
    request requirements on authenticated sessions. |

    | v1.0.2    | 2026-02-10 | Clarified authentication/signature rules and
    subscription field requirements. |

    | v1.0.1    | 2026-01-28 | Added DROPCOPY channel for order drop copy. |

    | v1.0.0    | 2025-10-16 | Initial Release.                            |
  contact:
    email: info@truex.co
  termsOfService: https://truex.co/tos
  version: v1.0.3
servers:
  uat:
    host: uat.truex.co
    protocol: wss
    description: UAT websocket sandbox server.
    security:
      - type: httpApiKey
        in: query
        name: x-no-auth
        description: >
          This security scheme documents message-level behavior. Authentication
          fields are carried in the subscription message payload, not as HTTP
          query parameters.


          Clients may subscribe to endpoints without an API key or computing an
          HMAC signature. These endpoints are rate limited by the server,
          coalescing and only sending data at a predetermined rate.
          Non-authenticated connections can be upgraded by supplying an API key
          and computed HMAC signature on the next request sent to the server.


          Unauthenticated requests must have type `SUBSCRIBE_NO_AUTH` or
          `UNSUBSCRIBE_NO_AUTH` and must not include the following fields in the
          request: `organization_id`, `key`, `signature`.


          `*_NO_AUTH` requests are only valid on unauthenticated sessions. If a
          connection is already authenticated, no-auth requests are rejected and
          do not modify authenticated subscriptions.


          ### Required members
            * `timestamp`: A UTC Unix epoch in seconds.
      - type: httpApiKey
        in: query
        name: x-api-key
        description: >
          This security scheme documents message-level behavior. Authentication
          fields are carried in the subscription message payload, not as HTTP
          query parameters.


          Clients must compute and send an HMAC signature in the `signature`
          member of the request structure.


          Compute the payload exactly as:


          `timestamp + TRUEXWS + key + path`


          Then compute the signature as:


          `Base64( HMAC_SHA256(secret, payload) )`


          Rules:

          * `timestamp` is a Unix epoch in **seconds**.

          * `TRUEXWS` is the literal string `TRUEXWS`.

          * `key` is the API key UUID string.

          * `path` is everything after the domain, including leading `/` (e.g.
          `/api/v1`).

          * Timestamp must not be in the future and must be no older than 15
          seconds relative to server time.


          Example payload:

          * `1700000000TRUEXWS11112222-3333-4444-8555-666677778888/api/v1`


          Example signature (shell):

          * `printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$SECRET"
          -binary | base64`


          ### Required members

          * `signature`: The signature generated from processing the payload
          with the HMAC key.

          * `key`: The ID of the HMAC key being used.

          * `timestamp`: A UTC Unix epoch in seconds.
  production:
    host: prod.truex.co
    protocol: wss
    description: Production websocket server.
    security:
      - type: httpApiKey
        in: query
        name: x-no-auth
        description: >
          This security scheme documents message-level behavior. Authentication
          fields are carried in the subscription message payload, not as HTTP
          query parameters.


          Clients may subscribe to endpoints without an API key or computing an
          HMAC signature. These endpoints are rate limited by the server,
          coalescing and only sending data at a predetermined rate.
          Non-authenticated connections can be upgraded by supplying an API key
          and computed HMAC signature on the next request sent to the server.


          Unauthenticated requests must have type `SUBSCRIBE_NO_AUTH` or
          `UNSUBSCRIBE_NO_AUTH` and must not include the following fields in the
          request: `organization_id`, `key`, `signature`.


          `*_NO_AUTH` requests are only valid on unauthenticated sessions. If a
          connection is already authenticated, no-auth requests are rejected and
          do not modify authenticated subscriptions.


          ### Required members
            * `timestamp`: A UTC Unix epoch in seconds.
      - type: httpApiKey
        in: query
        name: x-api-key
        description: >
          This security scheme documents message-level behavior. Authentication
          fields are carried in the subscription message payload, not as HTTP
          query parameters.


          Clients must compute and send an HMAC signature in the `signature`
          member of the request structure.


          Compute the payload exactly as:


          `timestamp + TRUEXWS + key + path`


          Then compute the signature as:


          `Base64( HMAC_SHA256(secret, payload) )`


          Rules:

          * `timestamp` is a Unix epoch in **seconds**.

          * `TRUEXWS` is the literal string `TRUEXWS`.

          * `key` is the API key UUID string.

          * `path` is everything after the domain, including leading `/` (e.g.
          `/api/v1`).

          * Timestamp must not be in the future and must be no older than 15
          seconds relative to server time.


          Example payload:

          * `1700000000TRUEXWS11112222-3333-4444-8555-666677778888/api/v1`


          Example signature (shell):

          * `printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$SECRET"
          -binary | base64`


          ### Required members

          * `signature`: The signature generated from processing the payload
          with the HMAC key.

          * `key`: The ID of the HMAC key being used.

          * `timestamp`: A UTC Unix epoch in seconds.
channels:
  v1:
    address: /api/v1
    messages:
      subscription:
        security:
          - HMAC: []
        payload:
          type: object
          required:
            - type
            - item_names
            - channels
            - timestamp
          oneOf:
            - description: >-
                Authenticated request (`SUBSCRIBE` or `UNSUBSCRIBE`) requiring
                credentials.
              properties:
                type:
                  enum:
                    - SUBSCRIBE
                    - UNSUBSCRIBE
                organization_id:
                  type: string
                key:
                  type: string
                signature:
                  type: string
              required:
                - organization_id
                - key
                - signature
            - description: >-
                Unauthenticated request (`SUBSCRIBE_NO_AUTH` or
                `UNSUBSCRIBE_NO_AUTH`) with no auth credential fields.
              properties:
                type:
                  enum:
                    - SUBSCRIBE_NO_AUTH
                    - UNSUBSCRIBE_NO_AUTH
                organization_id:
                  type: string
                key:
                  type: string
                signature:
                  type: string
              not:
                anyOf:
                  - required:
                      - organization_id
                    properties:
                      organization_id:
                        type: string
                  - required:
                      - key
                    properties:
                      key:
                        type: string
                  - required:
                      - signature
                    properties:
                      signature:
                        type: string
          properties:
            type:
              type: string
              description: Action the request is intending to take.
              enum:
                - SUBSCRIBE
                - SUBSCRIBE_NO_AUTH
                - UNSUBSCRIBE
                - UNSUBSCRIBE_NO_AUTH
              example: SUBSCRIBE
            item_names:
              type: array
              description: >-
                List of items the request is intending to act upon. For market
                data channels (INSTRUMENT, EBBO, DEPTH, TRADE), this contains
                instrument symbols. For the DROPCOPY channel, this contains
                client IDs as strings.
              items:
                type: string
                example: BTC-PYUSD
            channels:
              type: array
              description: >-
                List of channels the request is intending to interact with.
                Note: DROPCOPY channel requires authentication.
              items:
                type: string
                enum:
                  - INSTRUMENT
                  - EBBO
                  - DEPTH
                  - TRADE
                  - DROPCOPY
                example: INSTRUMENT
            timestamp:
              description: >
                Required field on all requests; a UTC Unix epoch in seconds.
                Must not be in the future and must be no older than 15 seconds
                relative to server time.
              type: string
              example: '1741894773'
            organization_id:
              description: >-
                Exchange designation ID will be UUIDv4. Must be supplied in
                human readable form. [RFC
                9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
              type: string
              example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
            key:
              description: >-
                Exchange supplied API key will be in UUIDv4. Must be supplied in
                human readable form. [RFC
                9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
              type: string
              example: 6398805c-f369-40f6-ac07-94ce683056e4
            signature:
              description: The computed HMAC signature.
              type: string
              example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
      welcome:
        payload:
          type: object
          properties:
            connections:
              type: string
              description: Current number of active connections from the source IP.
              example: '3'
            channel:
              type: string
              description: Channel this message originated from.
              enum:
                - WEBSOCKET
              example: WEBSOCKET
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - WELCOME
              example: WELCOME
            message:
              type: string
              description: Message supplied when initiating a connection with the server.
              example: Welcome to True Markets!
            version:
              type: string
              description: Current version of the websocket API.
              example: 1.0.0
            datetime:
              description: Current datetime of when the server sent the message,
              type: string
              example: '2025-01-01 17:00:00'
      confirmation:
        payload:
          type: object
          properties:
            timestamp:
              type: string
              description: Server timestamp when the confirmation was generated.
              example: '1741894944'
            channel:
              type: string
              description: Channel this message originated from.
              enum:
                - WEBSOCKET
              example: WEBSOCKET
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            status:
              type: string
              description: Current status of the websocket connection.
              enum:
                - INVALID
                - ERROR
                - UNAUTHORIZED
                - UNAUTHENTICATED
                - AUTHENTICATED
              example: AUTHENTICATED
            subscriptions:
              type: array
              description: >-
                List of current subscriptions. For DROPCOPY channel, item_names
                contains client IDs.
              items:
                type: object
                properties:
                  channel:
                    type: string
                    enum:
                      - INSTRUMENT
                      - EBBO
                      - DEPTH
                      - TRADE
                      - DROPCOPY
                    example: EBBO
                  item_names:
                    type: array
                    description: >-
                      Subscribed items. For market data channels, these are
                      instrument symbols. For DROPCOPY, these are client IDs.
                    items:
                      type: string
                      example: BTC-PYUSD
      instrument:
        payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '12345'
            channel:
              type: string
              description: Channel this message originated from.
              enum:
                - INSTRUMENT
              example: INSTRUMENT
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            data:
              type: object
              properties:
                id:
                  type: string
                  example: '123456789'
                  description: Exchange assigned ID of the instrument.
                status:
                  enum:
                    - DISABLED
                    - OPENING
                    - ACTIVE
                    - HALTED
                  type: string
                  example: ACTIVE
                  description: Current instrument state.
                info:
                  type: object
                  properties:
                    symbol:
                      type: string
                      maxLength: 31
                      example: BTC-PYUSD
                      description: Human readable representation of the instrument.
                    reference_price:
                      type: string
                      example: '75000.50'
                      description: Price used for initial price limit/band calcuations.
                    base_asset_id:
                      type: string
                      example: '123456789'
                      description: ID of the base asset.
                    quote_asset_id:
                      type: string
                      example: '123456789'
                      description: ID of the quote asset.
                    price_limit_window_secs:
                      type: string
                      example: '3600'
                      description: Number of seconds in the price limit's sliding window.
                    price_limit_percent:
                      type: string
                      description: >-
                        Specifies the percentage threshold for price movement
                        beyond a reference price (e.g., the midpoint or previous
                        close) at which the exchange will take action. If the
                        price of a trade or order breaches this threshold, the
                        exchange may halt trading, trigger a circuit breaker, or
                        initiate other predefined actions to ensure market
                        stability.
                    price_bands_percent:
                      type: string
                      example: '0.025'
                      description: >-
                        Defines the acceptable price range for order validation
                        within the market. The price bands ensure that orders
                        are priced within a range around the market's midpoint,
                        adjusted for increments and thresholds.
                stats:
                  type: object
                  properties:
                    last_24hr_notional:
                      type: string
                      example: '4325606.30380'
                      description: >-
                        The notional (quantity * price) amount of
                        REFERENCE_ASSET traded over the last 24hr period.
                    last_24hr_quantity:
                      type: string
                      example: '123754.2345'
                      description: The quantity traded over the last 24 hour period.
      trade:
        payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '100001'
            channel:
              type: string
              description: Channel this message originated from.
              enum:
                - TRADE
              example: TRADE
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: UPDATE
            data:
              type: object
              properties:
                match_id:
                  type: string
                  description: A unique identifier for the trade match event.
                  example: '1234576970'
                taking_side:
                  type: string
                  description: Which side initiated the trade.
                  enum:
                    - BUY
                    - SELL
                  example: SELL
                info:
                  type: object
                  description: Last trade information.
                  properties:
                    price:
                      type: string
                      example: '75.50'
                    qty:
                      type: string
                      example: '1.5'
                    timestamp:
                      type: string
                      example: ''
                      description: >-
                        The Unix UTC timestamp (in nanoseconds) when the event
                        occurred.
                symbol:
                  type: string
                  maxLength: 31
                  example: BTC-PYUSD
                  description: Human readable representation of the instrument.
      ebbo:
        payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '20210209'
            channel:
              type: string
              description: Channel this message originated from.
              enum:
                - EBBO
              example: EBBO
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            data:
              type: object
              properties:
                id:
                  type: string
                  example: '0987654321'
                  description: Exchange assigned ID of the market data.
                symbol:
                  type: string
                  maxLength: 31
                  example: BTC-PYUSD
                  description: Human readable representation of the instrument.
                info:
                  type: object
                  properties:
                    last_trade:
                      type: object
                      description: Last trade information.
                      properties:
                        price:
                          type: string
                          example: '75.50'
                        qty:
                          type: string
                          example: '1.5'
                        timestamp:
                          type: string
                          example: ''
                          description: >-
                            The Unix UTC timestamp (in nanoseconds) when the
                            event occurred.
                    best_bid:
                      type: object
                      description: Current exchange best bid.
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                    best_ask:
                      type: object
                      description: Current exchange best ask.
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                    last_update:
                      type: string
                      example: '123478909'
                      description: >-
                        A UTC Unix epoch in nanoseconds indicating when the book
                        was last updated.
      depth:
        payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '20210209'
            channel:
              type: string
              description: Channel this message originated from.
              enum:
                - DEPTH
              example: DEPTH
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            data:
              type: object
              properties:
                symbol:
                  type: string
                  maxLength: 31
                  example: BTC-PYUSD
                  description: Human readable representation of the instrument.
                bids:
                  type: array
                  items:
                    type: object
                    properties:
                      price:
                        type: string
                        example: '110865.50'
                        description: Price at this level.
                      qty:
                        type: string
                        example: '0.00018'
                        description: Aggregate quantity resting at this level.
                      depth:
                        type: string
                        example: '10'
                        description: Number of orders resting at this level.
                asks:
                  type: array
                  items:
                    type: object
                    properties:
                      price:
                        type: string
                        example: '110865.50'
                        description: Price at this level.
                      qty:
                        type: string
                        example: '0.00018'
                        description: Aggregate quantity resting at this level.
                      depth:
                        type: string
                        example: '10'
                        description: Number of orders resting at this level.
      dropcopy:
        payload:
          type: object
          description: >-
            Order drop copy message containing order state information. This
            channel requires authentication - unauthenticated subscription
            requests will be rejected.
          properties:
            seqnum:
              type: string
              description: Per-connection sequence number for the DROPCOPY channel.
              example: '42'
            channel:
              type: string
              description: Channel this message originated from.
              enum:
                - DROPCOPY
              example: DROPCOPY
            update:
              type: string
              description: >-
                Type of update for the current message. SNAPSHOT is sent upon
                initial subscription with all active orders. UPDATE is sent for
                subsequent order state changes.
              enum:
                - SNAPSHOT
                - UPDATE
              example: UPDATE
            data:
              type: object
              description: Order data representing the current state of an order.
              properties:
                order_id:
                  type: string
                  example: '987654321'
                  description: Exchange assigned unique identifier for the order.
                client_id:
                  type: string
                  example: '12345'
                  description: Client ID that owns this order.
                instrument_id:
                  type: string
                  example: '111222333'
                  description: Exchange assigned ID of the instrument being traded.
                external_id:
                  type: string
                  example: my-order-001
                  description: Client-supplied external order identifier.
                symbol:
                  type: string
                  maxLength: 31
                  example: BTC-PYUSD
                  description: Human readable representation of the instrument.
                side:
                  type: string
                  enum:
                    - BUY
                    - SELL
                  example: BUY
                  description: Order side.
                order_type:
                  type: string
                  enum:
                    - LIMIT
                    - MARKET
                    - NOTIONAL_LIMIT
                  example: LIMIT
                  description: Type of order.
                time_in_force:
                  type: string
                  enum:
                    - GTC
                    - IOC
                  example: GTC
                  description: Time in force for the order.
                status:
                  type: string
                  enum:
                    - NEW_PENDING
                    - ACTIVE
                    - FILLED
                    - CANCEL_PENDING
                    - CANCELED
                    - MODIFY_PENDING
                    - REJECTED
                  example: ACTIVE
                  description: Current state of the order.
                price:
                  type: string
                  example: '50000.00'
                  description: Order price (for limit orders).
                quantity:
                  type: string
                  example: '1.5'
                  description: Original order quantity.
                leaves_qty:
                  type: string
                  example: '1.0'
                  description: Remaining quantity to be filled.
                executed_qty:
                  type: string
                  example: '0.5'
                  description: Total quantity that has been executed.
                executed_vwap:
                  type: string
                  example: '49500.00'
                  description: Volume weighted average price of executed quantity.
                event_type:
                  type: string
                  enum:
                    - NEW
                    - TRADE
                    - CANCELED
                    - MODIFIED
                    - REJECTED
                  example: TRADE
                  description: >-
                    Type of event that triggered this update (only present on
                    UPDATE messages).
                trade_price:
                  type: string
                  example: '50000.00'
                  description: Price of the last trade (only present on TRADE events).
                trade_qty:
                  type: string
                  example: '0.5'
                  description: Quantity of the last trade (only present on TRADE events).
                timestamp:
                  type: string
                  example: '1737469200000000'
                  description: UTC Unix timestamp in nanoseconds when the event occurred.
operations:
  subscribe:
    action: send
    description: >-
      Message sent to server indicating what channels and data the user would
      like to subscribe to.
    channel:
      address: /api/v1
      messages:
        subscription:
          security:
            - HMAC: []
          payload:
            type: object
            required:
              - type
              - item_names
              - channels
              - timestamp
            oneOf:
              - description: >-
                  Authenticated request (`SUBSCRIBE` or `UNSUBSCRIBE`) requiring
                  credentials.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE
                      - UNSUBSCRIBE
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                required:
                  - organization_id
                  - key
                  - signature
              - description: >-
                  Unauthenticated request (`SUBSCRIBE_NO_AUTH` or
                  `UNSUBSCRIBE_NO_AUTH`) with no auth credential fields.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE_NO_AUTH
                      - UNSUBSCRIBE_NO_AUTH
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                not:
                  anyOf:
                    - required:
                        - organization_id
                      properties:
                        organization_id:
                          type: string
                    - required:
                        - key
                      properties:
                        key:
                          type: string
                    - required:
                        - signature
                      properties:
                        signature:
                          type: string
            properties:
              type:
                type: string
                description: Action the request is intending to take.
                enum:
                  - SUBSCRIBE
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE
                  - UNSUBSCRIBE_NO_AUTH
                example: SUBSCRIBE
              item_names:
                type: array
                description: >-
                  List of items the request is intending to act upon. For market
                  data channels (INSTRUMENT, EBBO, DEPTH, TRADE), this contains
                  instrument symbols. For the DROPCOPY channel, this contains
                  client IDs as strings.
                items:
                  type: string
                  example: BTC-PYUSD
              channels:
                type: array
                description: >-
                  List of channels the request is intending to interact with.
                  Note: DROPCOPY channel requires authentication.
                items:
                  type: string
                  enum:
                    - INSTRUMENT
                    - EBBO
                    - DEPTH
                    - TRADE
                    - DROPCOPY
                  example: INSTRUMENT
              timestamp:
                description: >
                  Required field on all requests; a UTC Unix epoch in seconds.
                  Must not be in the future and must be no older than 15 seconds
                  relative to server time.
                type: string
                example: '1741894773'
              organization_id:
                description: >-
                  Exchange designation ID will be UUIDv4. Must be supplied in
                  human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
              key:
                description: >-
                  Exchange supplied API key will be in UUIDv4. Must be supplied
                  in human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 6398805c-f369-40f6-ac07-94ce683056e4
              signature:
                description: The computed HMAC signature.
                type: string
                example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
        welcome:
          payload:
            type: object
            properties:
              connections:
                type: string
                description: Current number of active connections from the source IP.
                example: '3'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - WELCOME
                example: WELCOME
              message:
                type: string
                description: Message supplied when initiating a connection with the server.
                example: Welcome to True Markets!
              version:
                type: string
                description: Current version of the websocket API.
                example: 1.0.0
              datetime:
                description: Current datetime of when the server sent the message,
                type: string
                example: '2025-01-01 17:00:00'
        confirmation:
          payload:
            type: object
            properties:
              timestamp:
                type: string
                description: Server timestamp when the confirmation was generated.
                example: '1741894944'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              status:
                type: string
                description: Current status of the websocket connection.
                enum:
                  - INVALID
                  - ERROR
                  - UNAUTHORIZED
                  - UNAUTHENTICATED
                  - AUTHENTICATED
                example: AUTHENTICATED
              subscriptions:
                type: array
                description: >-
                  List of current subscriptions. For DROPCOPY channel,
                  item_names contains client IDs.
                items:
                  type: object
                  properties:
                    channel:
                      type: string
                      enum:
                        - INSTRUMENT
                        - EBBO
                        - DEPTH
                        - TRADE
                        - DROPCOPY
                      example: EBBO
                    item_names:
                      type: array
                      description: >-
                        Subscribed items. For market data channels, these are
                        instrument symbols. For DROPCOPY, these are client IDs.
                      items:
                        type: string
                        example: BTC-PYUSD
        instrument:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '12345'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - INSTRUMENT
                example: INSTRUMENT
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '123456789'
                    description: Exchange assigned ID of the instrument.
                  status:
                    enum:
                      - DISABLED
                      - OPENING
                      - ACTIVE
                      - HALTED
                    type: string
                    example: ACTIVE
                    description: Current instrument state.
                  info:
                    type: object
                    properties:
                      symbol:
                        type: string
                        maxLength: 31
                        example: BTC-PYUSD
                        description: Human readable representation of the instrument.
                      reference_price:
                        type: string
                        example: '75000.50'
                        description: Price used for initial price limit/band calcuations.
                      base_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the base asset.
                      quote_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the quote asset.
                      price_limit_window_secs:
                        type: string
                        example: '3600'
                        description: Number of seconds in the price limit's sliding window.
                      price_limit_percent:
                        type: string
                        description: >-
                          Specifies the percentage threshold for price movement
                          beyond a reference price (e.g., the midpoint or
                          previous close) at which the exchange will take
                          action. If the price of a trade or order breaches this
                          threshold, the exchange may halt trading, trigger a
                          circuit breaker, or initiate other predefined actions
                          to ensure market stability.
                      price_bands_percent:
                        type: string
                        example: '0.025'
                        description: >-
                          Defines the acceptable price range for order
                          validation within the market. The price bands ensure
                          that orders are priced within a range around the
                          market's midpoint, adjusted for increments and
                          thresholds.
                  stats:
                    type: object
                    properties:
                      last_24hr_notional:
                        type: string
                        example: '4325606.30380'
                        description: >-
                          The notional (quantity * price) amount of
                          REFERENCE_ASSET traded over the last 24hr period.
                      last_24hr_quantity:
                        type: string
                        example: '123754.2345'
                        description: The quantity traded over the last 24 hour period.
        trade:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '100001'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - TRADE
                example: TRADE
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                properties:
                  match_id:
                    type: string
                    description: A unique identifier for the trade match event.
                    example: '1234576970'
                  taking_side:
                    type: string
                    description: Which side initiated the trade.
                    enum:
                      - BUY
                      - SELL
                    example: SELL
                  info:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occurred.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
        ebbo:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - EBBO
                example: EBBO
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '0987654321'
                    description: Exchange assigned ID of the market data.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  info:
                    type: object
                    properties:
                      last_trade:
                        type: object
                        description: Last trade information.
                        properties:
                          price:
                            type: string
                            example: '75.50'
                          qty:
                            type: string
                            example: '1.5'
                          timestamp:
                            type: string
                            example: ''
                            description: >-
                              The Unix UTC timestamp (in nanoseconds) when the
                              event occurred.
                      best_bid:
                        type: object
                        description: Current exchange best bid.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      best_ask:
                        type: object
                        description: Current exchange best ask.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      last_update:
                        type: string
                        example: '123478909'
                        description: >-
                          A UTC Unix epoch in nanoseconds indicating when the
                          book was last updated.
        depth:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DEPTH
                example: DEPTH
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  bids:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                  asks:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
        dropcopy:
          payload:
            type: object
            description: >-
              Order drop copy message containing order state information. This
              channel requires authentication - unauthenticated subscription
              requests will be rejected.
            properties:
              seqnum:
                type: string
                description: Per-connection sequence number for the DROPCOPY channel.
                example: '42'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DROPCOPY
                example: DROPCOPY
              update:
                type: string
                description: >-
                  Type of update for the current message. SNAPSHOT is sent upon
                  initial subscription with all active orders. UPDATE is sent
                  for subsequent order state changes.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                description: Order data representing the current state of an order.
                properties:
                  order_id:
                    type: string
                    example: '987654321'
                    description: Exchange assigned unique identifier for the order.
                  client_id:
                    type: string
                    example: '12345'
                    description: Client ID that owns this order.
                  instrument_id:
                    type: string
                    example: '111222333'
                    description: Exchange assigned ID of the instrument being traded.
                  external_id:
                    type: string
                    example: my-order-001
                    description: Client-supplied external order identifier.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  side:
                    type: string
                    enum:
                      - BUY
                      - SELL
                    example: BUY
                    description: Order side.
                  order_type:
                    type: string
                    enum:
                      - LIMIT
                      - MARKET
                      - NOTIONAL_LIMIT
                    example: LIMIT
                    description: Type of order.
                  time_in_force:
                    type: string
                    enum:
                      - GTC
                      - IOC
                    example: GTC
                    description: Time in force for the order.
                  status:
                    type: string
                    enum:
                      - NEW_PENDING
                      - ACTIVE
                      - FILLED
                      - CANCEL_PENDING
                      - CANCELED
                      - MODIFY_PENDING
                      - REJECTED
                    example: ACTIVE
                    description: Current state of the order.
                  price:
                    type: string
                    example: '50000.00'
                    description: Order price (for limit orders).
                  quantity:
                    type: string
                    example: '1.5'
                    description: Original order quantity.
                  leaves_qty:
                    type: string
                    example: '1.0'
                    description: Remaining quantity to be filled.
                  executed_qty:
                    type: string
                    example: '0.5'
                    description: Total quantity that has been executed.
                  executed_vwap:
                    type: string
                    example: '49500.00'
                    description: Volume weighted average price of executed quantity.
                  event_type:
                    type: string
                    enum:
                      - NEW
                      - TRADE
                      - CANCELED
                      - MODIFIED
                      - REJECTED
                    example: TRADE
                    description: >-
                      Type of event that triggered this update (only present on
                      UPDATE messages).
                  trade_price:
                    type: string
                    example: '50000.00'
                    description: Price of the last trade (only present on TRADE events).
                  trade_qty:
                    type: string
                    example: '0.5'
                    description: Quantity of the last trade (only present on TRADE events).
                  timestamp:
                    type: string
                    example: '1737469200000000'
                    description: UTC Unix timestamp in nanoseconds when the event occurred.
    messages:
      - payload:
          type: object
          required:
            - type
            - item_names
            - channels
            - timestamp
          oneOf:
            - description: >-
                Authenticated request (`SUBSCRIBE` or `UNSUBSCRIBE`) requiring
                credentials.
              properties:
                type:
                  enum:
                    - SUBSCRIBE
                    - UNSUBSCRIBE
                organization_id:
                  type: string
                key:
                  type: string
                signature:
                  type: string
              required:
                - organization_id
                - key
                - signature
            - description: >-
                Unauthenticated request (`SUBSCRIBE_NO_AUTH` or
                `UNSUBSCRIBE_NO_AUTH`) with no auth credential fields.
              properties:
                type:
                  enum:
                    - SUBSCRIBE_NO_AUTH
                    - UNSUBSCRIBE_NO_AUTH
                organization_id:
                  type: string
                key:
                  type: string
                signature:
                  type: string
              not:
                anyOf:
                  - required:
                      - organization_id
                    properties:
                      organization_id:
                        type: string
                  - required:
                      - key
                    properties:
                      key:
                        type: string
                  - required:
                      - signature
                    properties:
                      signature:
                        type: string
          properties:
            type:
              type: string
              description: Action the request is intending to take.
              enum:
                - SUBSCRIBE
                - SUBSCRIBE_NO_AUTH
                - UNSUBSCRIBE
                - UNSUBSCRIBE_NO_AUTH
              example: SUBSCRIBE
            item_names:
              type: array
              description: >-
                List of items the request is intending to act upon. For market
                data channels (INSTRUMENT, EBBO, DEPTH, TRADE), this contains
                instrument symbols. For the DROPCOPY channel, this contains
                client IDs as strings.
              items:
                type: string
                example: BTC-PYUSD
            channels:
              type: array
              description: >-
                List of channels the request is intending to interact with.
                Note: DROPCOPY channel requires authentication.
              items:
                type: string
                enum:
                  - INSTRUMENT
                  - EBBO
                  - DEPTH
                  - TRADE
                  - DROPCOPY
                example: INSTRUMENT
            timestamp:
              description: >
                Required field on all requests; a UTC Unix epoch in seconds.
                Must not be in the future and must be no older than 15 seconds
                relative to server time.
              type: string
              example: '1741894773'
            organization_id:
              description: >-
                Exchange designation ID will be UUIDv4. Must be supplied in
                human readable form. [RFC
                9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
              type: string
              example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
            key:
              description: >-
                Exchange supplied API key will be in UUIDv4. Must be supplied in
                human readable form. [RFC
                9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
              type: string
              example: 6398805c-f369-40f6-ac07-94ce683056e4
            signature:
              description: The computed HMAC signature.
              type: string
              example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
  welcome:
    action: receive
    description: >-
      Message received when connecting to the server and establishing a
      websocket connection.
    channel:
      address: /api/v1
      messages:
        subscription:
          security:
            - HMAC: []
          payload:
            type: object
            required:
              - type
              - item_names
              - channels
              - timestamp
            oneOf:
              - description: >-
                  Authenticated request (`SUBSCRIBE` or `UNSUBSCRIBE`) requiring
                  credentials.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE
                      - UNSUBSCRIBE
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                required:
                  - organization_id
                  - key
                  - signature
              - description: >-
                  Unauthenticated request (`SUBSCRIBE_NO_AUTH` or
                  `UNSUBSCRIBE_NO_AUTH`) with no auth credential fields.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE_NO_AUTH
                      - UNSUBSCRIBE_NO_AUTH
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                not:
                  anyOf:
                    - required:
                        - organization_id
                      properties:
                        organization_id:
                          type: string
                    - required:
                        - key
                      properties:
                        key:
                          type: string
                    - required:
                        - signature
                      properties:
                        signature:
                          type: string
            properties:
              type:
                type: string
                description: Action the request is intending to take.
                enum:
                  - SUBSCRIBE
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE
                  - UNSUBSCRIBE_NO_AUTH
                example: SUBSCRIBE
              item_names:
                type: array
                description: >-
                  List of items the request is intending to act upon. For market
                  data channels (INSTRUMENT, EBBO, DEPTH, TRADE), this contains
                  instrument symbols. For the DROPCOPY channel, this contains
                  client IDs as strings.
                items:
                  type: string
                  example: BTC-PYUSD
              channels:
                type: array
                description: >-
                  List of channels the request is intending to interact with.
                  Note: DROPCOPY channel requires authentication.
                items:
                  type: string
                  enum:
                    - INSTRUMENT
                    - EBBO
                    - DEPTH
                    - TRADE
                    - DROPCOPY
                  example: INSTRUMENT
              timestamp:
                description: >
                  Required field on all requests; a UTC Unix epoch in seconds.
                  Must not be in the future and must be no older than 15 seconds
                  relative to server time.
                type: string
                example: '1741894773'
              organization_id:
                description: >-
                  Exchange designation ID will be UUIDv4. Must be supplied in
                  human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
              key:
                description: >-
                  Exchange supplied API key will be in UUIDv4. Must be supplied
                  in human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 6398805c-f369-40f6-ac07-94ce683056e4
              signature:
                description: The computed HMAC signature.
                type: string
                example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
        welcome:
          payload:
            type: object
            properties:
              connections:
                type: string
                description: Current number of active connections from the source IP.
                example: '3'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - WELCOME
                example: WELCOME
              message:
                type: string
                description: Message supplied when initiating a connection with the server.
                example: Welcome to True Markets!
              version:
                type: string
                description: Current version of the websocket API.
                example: 1.0.0
              datetime:
                description: Current datetime of when the server sent the message,
                type: string
                example: '2025-01-01 17:00:00'
        confirmation:
          payload:
            type: object
            properties:
              timestamp:
                type: string
                description: Server timestamp when the confirmation was generated.
                example: '1741894944'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              status:
                type: string
                description: Current status of the websocket connection.
                enum:
                  - INVALID
                  - ERROR
                  - UNAUTHORIZED
                  - UNAUTHENTICATED
                  - AUTHENTICATED
                example: AUTHENTICATED
              subscriptions:
                type: array
                description: >-
                  List of current subscriptions. For DROPCOPY channel,
                  item_names contains client IDs.
                items:
                  type: object
                  properties:
                    channel:
                      type: string
                      enum:
                        - INSTRUMENT
                        - EBBO
                        - DEPTH
                        - TRADE
                        - DROPCOPY
                      example: EBBO
                    item_names:
                      type: array
                      description: >-
                        Subscribed items. For market data channels, these are
                        instrument symbols. For DROPCOPY, these are client IDs.
                      items:
                        type: string
                        example: BTC-PYUSD
        instrument:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '12345'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - INSTRUMENT
                example: INSTRUMENT
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '123456789'
                    description: Exchange assigned ID of the instrument.
                  status:
                    enum:
                      - DISABLED
                      - OPENING
                      - ACTIVE
                      - HALTED
                    type: string
                    example: ACTIVE
                    description: Current instrument state.
                  info:
                    type: object
                    properties:
                      symbol:
                        type: string
                        maxLength: 31
                        example: BTC-PYUSD
                        description: Human readable representation of the instrument.
                      reference_price:
                        type: string
                        example: '75000.50'
                        description: Price used for initial price limit/band calcuations.
                      base_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the base asset.
                      quote_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the quote asset.
                      price_limit_window_secs:
                        type: string
                        example: '3600'
                        description: Number of seconds in the price limit's sliding window.
                      price_limit_percent:
                        type: string
                        description: >-
                          Specifies the percentage threshold for price movement
                          beyond a reference price (e.g., the midpoint or
                          previous close) at which the exchange will take
                          action. If the price of a trade or order breaches this
                          threshold, the exchange may halt trading, trigger a
                          circuit breaker, or initiate other predefined actions
                          to ensure market stability.
                      price_bands_percent:
                        type: string
                        example: '0.025'
                        description: >-
                          Defines the acceptable price range for order
                          validation within the market. The price bands ensure
                          that orders are priced within a range around the
                          market's midpoint, adjusted for increments and
                          thresholds.
                  stats:
                    type: object
                    properties:
                      last_24hr_notional:
                        type: string
                        example: '4325606.30380'
                        description: >-
                          The notional (quantity * price) amount of
                          REFERENCE_ASSET traded over the last 24hr period.
                      last_24hr_quantity:
                        type: string
                        example: '123754.2345'
                        description: The quantity traded over the last 24 hour period.
        trade:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '100001'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - TRADE
                example: TRADE
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                properties:
                  match_id:
                    type: string
                    description: A unique identifier for the trade match event.
                    example: '1234576970'
                  taking_side:
                    type: string
                    description: Which side initiated the trade.
                    enum:
                      - BUY
                      - SELL
                    example: SELL
                  info:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occurred.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
        ebbo:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - EBBO
                example: EBBO
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '0987654321'
                    description: Exchange assigned ID of the market data.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  info:
                    type: object
                    properties:
                      last_trade:
                        type: object
                        description: Last trade information.
                        properties:
                          price:
                            type: string
                            example: '75.50'
                          qty:
                            type: string
                            example: '1.5'
                          timestamp:
                            type: string
                            example: ''
                            description: >-
                              The Unix UTC timestamp (in nanoseconds) when the
                              event occurred.
                      best_bid:
                        type: object
                        description: Current exchange best bid.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      best_ask:
                        type: object
                        description: Current exchange best ask.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      last_update:
                        type: string
                        example: '123478909'
                        description: >-
                          A UTC Unix epoch in nanoseconds indicating when the
                          book was last updated.
        depth:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DEPTH
                example: DEPTH
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  bids:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                  asks:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
        dropcopy:
          payload:
            type: object
            description: >-
              Order drop copy message containing order state information. This
              channel requires authentication - unauthenticated subscription
              requests will be rejected.
            properties:
              seqnum:
                type: string
                description: Per-connection sequence number for the DROPCOPY channel.
                example: '42'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DROPCOPY
                example: DROPCOPY
              update:
                type: string
                description: >-
                  Type of update for the current message. SNAPSHOT is sent upon
                  initial subscription with all active orders. UPDATE is sent
                  for subsequent order state changes.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                description: Order data representing the current state of an order.
                properties:
                  order_id:
                    type: string
                    example: '987654321'
                    description: Exchange assigned unique identifier for the order.
                  client_id:
                    type: string
                    example: '12345'
                    description: Client ID that owns this order.
                  instrument_id:
                    type: string
                    example: '111222333'
                    description: Exchange assigned ID of the instrument being traded.
                  external_id:
                    type: string
                    example: my-order-001
                    description: Client-supplied external order identifier.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  side:
                    type: string
                    enum:
                      - BUY
                      - SELL
                    example: BUY
                    description: Order side.
                  order_type:
                    type: string
                    enum:
                      - LIMIT
                      - MARKET
                      - NOTIONAL_LIMIT
                    example: LIMIT
                    description: Type of order.
                  time_in_force:
                    type: string
                    enum:
                      - GTC
                      - IOC
                    example: GTC
                    description: Time in force for the order.
                  status:
                    type: string
                    enum:
                      - NEW_PENDING
                      - ACTIVE
                      - FILLED
                      - CANCEL_PENDING
                      - CANCELED
                      - MODIFY_PENDING
                      - REJECTED
                    example: ACTIVE
                    description: Current state of the order.
                  price:
                    type: string
                    example: '50000.00'
                    description: Order price (for limit orders).
                  quantity:
                    type: string
                    example: '1.5'
                    description: Original order quantity.
                  leaves_qty:
                    type: string
                    example: '1.0'
                    description: Remaining quantity to be filled.
                  executed_qty:
                    type: string
                    example: '0.5'
                    description: Total quantity that has been executed.
                  executed_vwap:
                    type: string
                    example: '49500.00'
                    description: Volume weighted average price of executed quantity.
                  event_type:
                    type: string
                    enum:
                      - NEW
                      - TRADE
                      - CANCELED
                      - MODIFIED
                      - REJECTED
                    example: TRADE
                    description: >-
                      Type of event that triggered this update (only present on
                      UPDATE messages).
                  trade_price:
                    type: string
                    example: '50000.00'
                    description: Price of the last trade (only present on TRADE events).
                  trade_qty:
                    type: string
                    example: '0.5'
                    description: Quantity of the last trade (only present on TRADE events).
                  timestamp:
                    type: string
                    example: '1737469200000000'
                    description: UTC Unix timestamp in nanoseconds when the event occurred.
    messages:
      - payload:
          type: object
          properties:
            connections:
              type: string
              description: Current number of active connections from the source IP.
              example: '3'
            channel:
              type: string
              description: Channel this message originated from.
              enum:
                - WEBSOCKET
              example: WEBSOCKET
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - WELCOME
              example: WELCOME
            message:
              type: string
              description: Message supplied when initiating a connection with the server.
              example: Welcome to True Markets!
            version:
              type: string
              description: Current version of the websocket API.
              example: 1.0.0
            datetime:
              description: Current datetime of when the server sent the message,
              type: string
              example: '2025-01-01 17:00:00'
  confirmation:
    action: receive
    description: >-
      Message sent from server containing channels and items the user is
      currently subscribed to.
    channel:
      address: /api/v1
      messages:
        subscription:
          security:
            - HMAC: []
          payload:
            type: object
            required:
              - type
              - item_names
              - channels
              - timestamp
            oneOf:
              - description: >-
                  Authenticated request (`SUBSCRIBE` or `UNSUBSCRIBE`) requiring
                  credentials.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE
                      - UNSUBSCRIBE
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                required:
                  - organization_id
                  - key
                  - signature
              - description: >-
                  Unauthenticated request (`SUBSCRIBE_NO_AUTH` or
                  `UNSUBSCRIBE_NO_AUTH`) with no auth credential fields.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE_NO_AUTH
                      - UNSUBSCRIBE_NO_AUTH
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                not:
                  anyOf:
                    - required:
                        - organization_id
                      properties:
                        organization_id:
                          type: string
                    - required:
                        - key
                      properties:
                        key:
                          type: string
                    - required:
                        - signature
                      properties:
                        signature:
                          type: string
            properties:
              type:
                type: string
                description: Action the request is intending to take.
                enum:
                  - SUBSCRIBE
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE
                  - UNSUBSCRIBE_NO_AUTH
                example: SUBSCRIBE
              item_names:
                type: array
                description: >-
                  List of items the request is intending to act upon. For market
                  data channels (INSTRUMENT, EBBO, DEPTH, TRADE), this contains
                  instrument symbols. For the DROPCOPY channel, this contains
                  client IDs as strings.
                items:
                  type: string
                  example: BTC-PYUSD
              channels:
                type: array
                description: >-
                  List of channels the request is intending to interact with.
                  Note: DROPCOPY channel requires authentication.
                items:
                  type: string
                  enum:
                    - INSTRUMENT
                    - EBBO
                    - DEPTH
                    - TRADE
                    - DROPCOPY
                  example: INSTRUMENT
              timestamp:
                description: >
                  Required field on all requests; a UTC Unix epoch in seconds.
                  Must not be in the future and must be no older than 15 seconds
                  relative to server time.
                type: string
                example: '1741894773'
              organization_id:
                description: >-
                  Exchange designation ID will be UUIDv4. Must be supplied in
                  human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
              key:
                description: >-
                  Exchange supplied API key will be in UUIDv4. Must be supplied
                  in human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 6398805c-f369-40f6-ac07-94ce683056e4
              signature:
                description: The computed HMAC signature.
                type: string
                example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
        welcome:
          payload:
            type: object
            properties:
              connections:
                type: string
                description: Current number of active connections from the source IP.
                example: '3'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - WELCOME
                example: WELCOME
              message:
                type: string
                description: Message supplied when initiating a connection with the server.
                example: Welcome to True Markets!
              version:
                type: string
                description: Current version of the websocket API.
                example: 1.0.0
              datetime:
                description: Current datetime of when the server sent the message,
                type: string
                example: '2025-01-01 17:00:00'
        confirmation:
          payload:
            type: object
            properties:
              timestamp:
                type: string
                description: Server timestamp when the confirmation was generated.
                example: '1741894944'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              status:
                type: string
                description: Current status of the websocket connection.
                enum:
                  - INVALID
                  - ERROR
                  - UNAUTHORIZED
                  - UNAUTHENTICATED
                  - AUTHENTICATED
                example: AUTHENTICATED
              subscriptions:
                type: array
                description: >-
                  List of current subscriptions. For DROPCOPY channel,
                  item_names contains client IDs.
                items:
                  type: object
                  properties:
                    channel:
                      type: string
                      enum:
                        - INSTRUMENT
                        - EBBO
                        - DEPTH
                        - TRADE
                        - DROPCOPY
                      example: EBBO
                    item_names:
                      type: array
                      description: >-
                        Subscribed items. For market data channels, these are
                        instrument symbols. For DROPCOPY, these are client IDs.
                      items:
                        type: string
                        example: BTC-PYUSD
        instrument:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '12345'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - INSTRUMENT
                example: INSTRUMENT
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '123456789'
                    description: Exchange assigned ID of the instrument.
                  status:
                    enum:
                      - DISABLED
                      - OPENING
                      - ACTIVE
                      - HALTED
                    type: string
                    example: ACTIVE
                    description: Current instrument state.
                  info:
                    type: object
                    properties:
                      symbol:
                        type: string
                        maxLength: 31
                        example: BTC-PYUSD
                        description: Human readable representation of the instrument.
                      reference_price:
                        type: string
                        example: '75000.50'
                        description: Price used for initial price limit/band calcuations.
                      base_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the base asset.
                      quote_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the quote asset.
                      price_limit_window_secs:
                        type: string
                        example: '3600'
                        description: Number of seconds in the price limit's sliding window.
                      price_limit_percent:
                        type: string
                        description: >-
                          Specifies the percentage threshold for price movement
                          beyond a reference price (e.g., the midpoint or
                          previous close) at which the exchange will take
                          action. If the price of a trade or order breaches this
                          threshold, the exchange may halt trading, trigger a
                          circuit breaker, or initiate other predefined actions
                          to ensure market stability.
                      price_bands_percent:
                        type: string
                        example: '0.025'
                        description: >-
                          Defines the acceptable price range for order
                          validation within the market. The price bands ensure
                          that orders are priced within a range around the
                          market's midpoint, adjusted for increments and
                          thresholds.
                  stats:
                    type: object
                    properties:
                      last_24hr_notional:
                        type: string
                        example: '4325606.30380'
                        description: >-
                          The notional (quantity * price) amount of
                          REFERENCE_ASSET traded over the last 24hr period.
                      last_24hr_quantity:
                        type: string
                        example: '123754.2345'
                        description: The quantity traded over the last 24 hour period.
        trade:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '100001'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - TRADE
                example: TRADE
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                properties:
                  match_id:
                    type: string
                    description: A unique identifier for the trade match event.
                    example: '1234576970'
                  taking_side:
                    type: string
                    description: Which side initiated the trade.
                    enum:
                      - BUY
                      - SELL
                    example: SELL
                  info:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occurred.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
        ebbo:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - EBBO
                example: EBBO
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '0987654321'
                    description: Exchange assigned ID of the market data.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  info:
                    type: object
                    properties:
                      last_trade:
                        type: object
                        description: Last trade information.
                        properties:
                          price:
                            type: string
                            example: '75.50'
                          qty:
                            type: string
                            example: '1.5'
                          timestamp:
                            type: string
                            example: ''
                            description: >-
                              The Unix UTC timestamp (in nanoseconds) when the
                              event occurred.
                      best_bid:
                        type: object
                        description: Current exchange best bid.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      best_ask:
                        type: object
                        description: Current exchange best ask.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      last_update:
                        type: string
                        example: '123478909'
                        description: >-
                          A UTC Unix epoch in nanoseconds indicating when the
                          book was last updated.
        depth:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DEPTH
                example: DEPTH
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  bids:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                  asks:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
        dropcopy:
          payload:
            type: object
            description: >-
              Order drop copy message containing order state information. This
              channel requires authentication - unauthenticated subscription
              requests will be rejected.
            properties:
              seqnum:
                type: string
                description: Per-connection sequence number for the DROPCOPY channel.
                example: '42'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DROPCOPY
                example: DROPCOPY
              update:
                type: string
                description: >-
                  Type of update for the current message. SNAPSHOT is sent upon
                  initial subscription with all active orders. UPDATE is sent
                  for subsequent order state changes.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                description: Order data representing the current state of an order.
                properties:
                  order_id:
                    type: string
                    example: '987654321'
                    description: Exchange assigned unique identifier for the order.
                  client_id:
                    type: string
                    example: '12345'
                    description: Client ID that owns this order.
                  instrument_id:
                    type: string
                    example: '111222333'
                    description: Exchange assigned ID of the instrument being traded.
                  external_id:
                    type: string
                    example: my-order-001
                    description: Client-supplied external order identifier.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  side:
                    type: string
                    enum:
                      - BUY
                      - SELL
                    example: BUY
                    description: Order side.
                  order_type:
                    type: string
                    enum:
                      - LIMIT
                      - MARKET
                      - NOTIONAL_LIMIT
                    example: LIMIT
                    description: Type of order.
                  time_in_force:
                    type: string
                    enum:
                      - GTC
                      - IOC
                    example: GTC
                    description: Time in force for the order.
                  status:
                    type: string
                    enum:
                      - NEW_PENDING
                      - ACTIVE
                      - FILLED
                      - CANCEL_PENDING
                      - CANCELED
                      - MODIFY_PENDING
                      - REJECTED
                    example: ACTIVE
                    description: Current state of the order.
                  price:
                    type: string
                    example: '50000.00'
                    description: Order price (for limit orders).
                  quantity:
                    type: string
                    example: '1.5'
                    description: Original order quantity.
                  leaves_qty:
                    type: string
                    example: '1.0'
                    description: Remaining quantity to be filled.
                  executed_qty:
                    type: string
                    example: '0.5'
                    description: Total quantity that has been executed.
                  executed_vwap:
                    type: string
                    example: '49500.00'
                    description: Volume weighted average price of executed quantity.
                  event_type:
                    type: string
                    enum:
                      - NEW
                      - TRADE
                      - CANCELED
                      - MODIFIED
                      - REJECTED
                    example: TRADE
                    description: >-
                      Type of event that triggered this update (only present on
                      UPDATE messages).
                  trade_price:
                    type: string
                    example: '50000.00'
                    description: Price of the last trade (only present on TRADE events).
                  trade_qty:
                    type: string
                    example: '0.5'
                    description: Quantity of the last trade (only present on TRADE events).
                  timestamp:
                    type: string
                    example: '1737469200000000'
                    description: UTC Unix timestamp in nanoseconds when the event occurred.
    messages:
      - payload:
          type: object
          properties:
            timestamp:
              type: string
              description: Server timestamp when the confirmation was generated.
              example: '1741894944'
            channel:
              type: string
              description: Channel this message originated from.
              enum:
                - WEBSOCKET
              example: WEBSOCKET
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            status:
              type: string
              description: Current status of the websocket connection.
              enum:
                - INVALID
                - ERROR
                - UNAUTHORIZED
                - UNAUTHENTICATED
                - AUTHENTICATED
              example: AUTHENTICATED
            subscriptions:
              type: array
              description: >-
                List of current subscriptions. For DROPCOPY channel, item_names
                contains client IDs.
              items:
                type: object
                properties:
                  channel:
                    type: string
                    enum:
                      - INSTRUMENT
                      - EBBO
                      - DEPTH
                      - TRADE
                      - DROPCOPY
                    example: EBBO
                  item_names:
                    type: array
                    description: >-
                      Subscribed items. For market data channels, these are
                      instrument symbols. For DROPCOPY, these are client IDs.
                    items:
                      type: string
                      example: BTC-PYUSD
  instrument:
    action: receive
    description: Message sent from server with instrument data.
    channel:
      address: /api/v1
      messages:
        subscription:
          security:
            - HMAC: []
          payload:
            type: object
            required:
              - type
              - item_names
              - channels
              - timestamp
            oneOf:
              - description: >-
                  Authenticated request (`SUBSCRIBE` or `UNSUBSCRIBE`) requiring
                  credentials.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE
                      - UNSUBSCRIBE
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                required:
                  - organization_id
                  - key
                  - signature
              - description: >-
                  Unauthenticated request (`SUBSCRIBE_NO_AUTH` or
                  `UNSUBSCRIBE_NO_AUTH`) with no auth credential fields.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE_NO_AUTH
                      - UNSUBSCRIBE_NO_AUTH
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                not:
                  anyOf:
                    - required:
                        - organization_id
                      properties:
                        organization_id:
                          type: string
                    - required:
                        - key
                      properties:
                        key:
                          type: string
                    - required:
                        - signature
                      properties:
                        signature:
                          type: string
            properties:
              type:
                type: string
                description: Action the request is intending to take.
                enum:
                  - SUBSCRIBE
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE
                  - UNSUBSCRIBE_NO_AUTH
                example: SUBSCRIBE
              item_names:
                type: array
                description: >-
                  List of items the request is intending to act upon. For market
                  data channels (INSTRUMENT, EBBO, DEPTH, TRADE), this contains
                  instrument symbols. For the DROPCOPY channel, this contains
                  client IDs as strings.
                items:
                  type: string
                  example: BTC-PYUSD
              channels:
                type: array
                description: >-
                  List of channels the request is intending to interact with.
                  Note: DROPCOPY channel requires authentication.
                items:
                  type: string
                  enum:
                    - INSTRUMENT
                    - EBBO
                    - DEPTH
                    - TRADE
                    - DROPCOPY
                  example: INSTRUMENT
              timestamp:
                description: >
                  Required field on all requests; a UTC Unix epoch in seconds.
                  Must not be in the future and must be no older than 15 seconds
                  relative to server time.
                type: string
                example: '1741894773'
              organization_id:
                description: >-
                  Exchange designation ID will be UUIDv4. Must be supplied in
                  human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
              key:
                description: >-
                  Exchange supplied API key will be in UUIDv4. Must be supplied
                  in human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 6398805c-f369-40f6-ac07-94ce683056e4
              signature:
                description: The computed HMAC signature.
                type: string
                example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
        welcome:
          payload:
            type: object
            properties:
              connections:
                type: string
                description: Current number of active connections from the source IP.
                example: '3'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - WELCOME
                example: WELCOME
              message:
                type: string
                description: Message supplied when initiating a connection with the server.
                example: Welcome to True Markets!
              version:
                type: string
                description: Current version of the websocket API.
                example: 1.0.0
              datetime:
                description: Current datetime of when the server sent the message,
                type: string
                example: '2025-01-01 17:00:00'
        confirmation:
          payload:
            type: object
            properties:
              timestamp:
                type: string
                description: Server timestamp when the confirmation was generated.
                example: '1741894944'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              status:
                type: string
                description: Current status of the websocket connection.
                enum:
                  - INVALID
                  - ERROR
                  - UNAUTHORIZED
                  - UNAUTHENTICATED
                  - AUTHENTICATED
                example: AUTHENTICATED
              subscriptions:
                type: array
                description: >-
                  List of current subscriptions. For DROPCOPY channel,
                  item_names contains client IDs.
                items:
                  type: object
                  properties:
                    channel:
                      type: string
                      enum:
                        - INSTRUMENT
                        - EBBO
                        - DEPTH
                        - TRADE
                        - DROPCOPY
                      example: EBBO
                    item_names:
                      type: array
                      description: >-
                        Subscribed items. For market data channels, these are
                        instrument symbols. For DROPCOPY, these are client IDs.
                      items:
                        type: string
                        example: BTC-PYUSD
        instrument:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '12345'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - INSTRUMENT
                example: INSTRUMENT
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '123456789'
                    description: Exchange assigned ID of the instrument.
                  status:
                    enum:
                      - DISABLED
                      - OPENING
                      - ACTIVE
                      - HALTED
                    type: string
                    example: ACTIVE
                    description: Current instrument state.
                  info:
                    type: object
                    properties:
                      symbol:
                        type: string
                        maxLength: 31
                        example: BTC-PYUSD
                        description: Human readable representation of the instrument.
                      reference_price:
                        type: string
                        example: '75000.50'
                        description: Price used for initial price limit/band calcuations.
                      base_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the base asset.
                      quote_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the quote asset.
                      price_limit_window_secs:
                        type: string
                        example: '3600'
                        description: Number of seconds in the price limit's sliding window.
                      price_limit_percent:
                        type: string
                        description: >-
                          Specifies the percentage threshold for price movement
                          beyond a reference price (e.g., the midpoint or
                          previous close) at which the exchange will take
                          action. If the price of a trade or order breaches this
                          threshold, the exchange may halt trading, trigger a
                          circuit breaker, or initiate other predefined actions
                          to ensure market stability.
                      price_bands_percent:
                        type: string
                        example: '0.025'
                        description: >-
                          Defines the acceptable price range for order
                          validation within the market. The price bands ensure
                          that orders are priced within a range around the
                          market's midpoint, adjusted for increments and
                          thresholds.
                  stats:
                    type: object
                    properties:
                      last_24hr_notional:
                        type: string
                        example: '4325606.30380'
                        description: >-
                          The notional (quantity * price) amount of
                          REFERENCE_ASSET traded over the last 24hr period.
                      last_24hr_quantity:
                        type: string
                        example: '123754.2345'
                        description: The quantity traded over the last 24 hour period.
        trade:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '100001'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - TRADE
                example: TRADE
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                properties:
                  match_id:
                    type: string
                    description: A unique identifier for the trade match event.
                    example: '1234576970'
                  taking_side:
                    type: string
                    description: Which side initiated the trade.
                    enum:
                      - BUY
                      - SELL
                    example: SELL
                  info:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occurred.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
        ebbo:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - EBBO
                example: EBBO
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '0987654321'
                    description: Exchange assigned ID of the market data.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  info:
                    type: object
                    properties:
                      last_trade:
                        type: object
                        description: Last trade information.
                        properties:
                          price:
                            type: string
                            example: '75.50'
                          qty:
                            type: string
                            example: '1.5'
                          timestamp:
                            type: string
                            example: ''
                            description: >-
                              The Unix UTC timestamp (in nanoseconds) when the
                              event occurred.
                      best_bid:
                        type: object
                        description: Current exchange best bid.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      best_ask:
                        type: object
                        description: Current exchange best ask.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      last_update:
                        type: string
                        example: '123478909'
                        description: >-
                          A UTC Unix epoch in nanoseconds indicating when the
                          book was last updated.
        depth:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DEPTH
                example: DEPTH
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  bids:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                  asks:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
        dropcopy:
          payload:
            type: object
            description: >-
              Order drop copy message containing order state information. This
              channel requires authentication - unauthenticated subscription
              requests will be rejected.
            properties:
              seqnum:
                type: string
                description: Per-connection sequence number for the DROPCOPY channel.
                example: '42'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DROPCOPY
                example: DROPCOPY
              update:
                type: string
                description: >-
                  Type of update for the current message. SNAPSHOT is sent upon
                  initial subscription with all active orders. UPDATE is sent
                  for subsequent order state changes.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                description: Order data representing the current state of an order.
                properties:
                  order_id:
                    type: string
                    example: '987654321'
                    description: Exchange assigned unique identifier for the order.
                  client_id:
                    type: string
                    example: '12345'
                    description: Client ID that owns this order.
                  instrument_id:
                    type: string
                    example: '111222333'
                    description: Exchange assigned ID of the instrument being traded.
                  external_id:
                    type: string
                    example: my-order-001
                    description: Client-supplied external order identifier.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  side:
                    type: string
                    enum:
                      - BUY
                      - SELL
                    example: BUY
                    description: Order side.
                  order_type:
                    type: string
                    enum:
                      - LIMIT
                      - MARKET
                      - NOTIONAL_LIMIT
                    example: LIMIT
                    description: Type of order.
                  time_in_force:
                    type: string
                    enum:
                      - GTC
                      - IOC
                    example: GTC
                    description: Time in force for the order.
                  status:
                    type: string
                    enum:
                      - NEW_PENDING
                      - ACTIVE
                      - FILLED
                      - CANCEL_PENDING
                      - CANCELED
                      - MODIFY_PENDING
                      - REJECTED
                    example: ACTIVE
                    description: Current state of the order.
                  price:
                    type: string
                    example: '50000.00'
                    description: Order price (for limit orders).
                  quantity:
                    type: string
                    example: '1.5'
                    description: Original order quantity.
                  leaves_qty:
                    type: string
                    example: '1.0'
                    description: Remaining quantity to be filled.
                  executed_qty:
                    type: string
                    example: '0.5'
                    description: Total quantity that has been executed.
                  executed_vwap:
                    type: string
                    example: '49500.00'
                    description: Volume weighted average price of executed quantity.
                  event_type:
                    type: string
                    enum:
                      - NEW
                      - TRADE
                      - CANCELED
                      - MODIFIED
                      - REJECTED
                    example: TRADE
                    description: >-
                      Type of event that triggered this update (only present on
                      UPDATE messages).
                  trade_price:
                    type: string
                    example: '50000.00'
                    description: Price of the last trade (only present on TRADE events).
                  trade_qty:
                    type: string
                    example: '0.5'
                    description: Quantity of the last trade (only present on TRADE events).
                  timestamp:
                    type: string
                    example: '1737469200000000'
                    description: UTC Unix timestamp in nanoseconds when the event occurred.
    messages:
      - payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '12345'
            channel:
              type: string
              description: Channel this message originated from.
              enum:
                - INSTRUMENT
              example: INSTRUMENT
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            data:
              type: object
              properties:
                id:
                  type: string
                  example: '123456789'
                  description: Exchange assigned ID of the instrument.
                status:
                  enum:
                    - DISABLED
                    - OPENING
                    - ACTIVE
                    - HALTED
                  type: string
                  example: ACTIVE
                  description: Current instrument state.
                info:
                  type: object
                  properties:
                    symbol:
                      type: string
                      maxLength: 31
                      example: BTC-PYUSD
                      description: Human readable representation of the instrument.
                    reference_price:
                      type: string
                      example: '75000.50'
                      description: Price used for initial price limit/band calcuations.
                    base_asset_id:
                      type: string
                      example: '123456789'
                      description: ID of the base asset.
                    quote_asset_id:
                      type: string
                      example: '123456789'
                      description: ID of the quote asset.
                    price_limit_window_secs:
                      type: string
                      example: '3600'
                      description: Number of seconds in the price limit's sliding window.
                    price_limit_percent:
                      type: string
                      description: >-
                        Specifies the percentage threshold for price movement
                        beyond a reference price (e.g., the midpoint or previous
                        close) at which the exchange will take action. If the
                        price of a trade or order breaches this threshold, the
                        exchange may halt trading, trigger a circuit breaker, or
                        initiate other predefined actions to ensure market
                        stability.
                    price_bands_percent:
                      type: string
                      example: '0.025'
                      description: >-
                        Defines the acceptable price range for order validation
                        within the market. The price bands ensure that orders
                        are priced within a range around the market's midpoint,
                        adjusted for increments and thresholds.
                stats:
                  type: object
                  properties:
                    last_24hr_notional:
                      type: string
                      example: '4325606.30380'
                      description: >-
                        The notional (quantity * price) amount of
                        REFERENCE_ASSET traded over the last 24hr period.
                    last_24hr_quantity:
                      type: string
                      example: '123754.2345'
                      description: The quantity traded over the last 24 hour period.
  trade:
    action: receive
    description: >-
      Message sent from server containing the latest trade information for a
      subscribed instrument.
    channel:
      address: /api/v1
      messages:
        subscription:
          security:
            - HMAC: []
          payload:
            type: object
            required:
              - type
              - item_names
              - channels
              - timestamp
            oneOf:
              - description: >-
                  Authenticated request (`SUBSCRIBE` or `UNSUBSCRIBE`) requiring
                  credentials.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE
                      - UNSUBSCRIBE
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                required:
                  - organization_id
                  - key
                  - signature
              - description: >-
                  Unauthenticated request (`SUBSCRIBE_NO_AUTH` or
                  `UNSUBSCRIBE_NO_AUTH`) with no auth credential fields.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE_NO_AUTH
                      - UNSUBSCRIBE_NO_AUTH
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                not:
                  anyOf:
                    - required:
                        - organization_id
                      properties:
                        organization_id:
                          type: string
                    - required:
                        - key
                      properties:
                        key:
                          type: string
                    - required:
                        - signature
                      properties:
                        signature:
                          type: string
            properties:
              type:
                type: string
                description: Action the request is intending to take.
                enum:
                  - SUBSCRIBE
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE
                  - UNSUBSCRIBE_NO_AUTH
                example: SUBSCRIBE
              item_names:
                type: array
                description: >-
                  List of items the request is intending to act upon. For market
                  data channels (INSTRUMENT, EBBO, DEPTH, TRADE), this contains
                  instrument symbols. For the DROPCOPY channel, this contains
                  client IDs as strings.
                items:
                  type: string
                  example: BTC-PYUSD
              channels:
                type: array
                description: >-
                  List of channels the request is intending to interact with.
                  Note: DROPCOPY channel requires authentication.
                items:
                  type: string
                  enum:
                    - INSTRUMENT
                    - EBBO
                    - DEPTH
                    - TRADE
                    - DROPCOPY
                  example: INSTRUMENT
              timestamp:
                description: >
                  Required field on all requests; a UTC Unix epoch in seconds.
                  Must not be in the future and must be no older than 15 seconds
                  relative to server time.
                type: string
                example: '1741894773'
              organization_id:
                description: >-
                  Exchange designation ID will be UUIDv4. Must be supplied in
                  human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
              key:
                description: >-
                  Exchange supplied API key will be in UUIDv4. Must be supplied
                  in human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 6398805c-f369-40f6-ac07-94ce683056e4
              signature:
                description: The computed HMAC signature.
                type: string
                example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
        welcome:
          payload:
            type: object
            properties:
              connections:
                type: string
                description: Current number of active connections from the source IP.
                example: '3'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - WELCOME
                example: WELCOME
              message:
                type: string
                description: Message supplied when initiating a connection with the server.
                example: Welcome to True Markets!
              version:
                type: string
                description: Current version of the websocket API.
                example: 1.0.0
              datetime:
                description: Current datetime of when the server sent the message,
                type: string
                example: '2025-01-01 17:00:00'
        confirmation:
          payload:
            type: object
            properties:
              timestamp:
                type: string
                description: Server timestamp when the confirmation was generated.
                example: '1741894944'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              status:
                type: string
                description: Current status of the websocket connection.
                enum:
                  - INVALID
                  - ERROR
                  - UNAUTHORIZED
                  - UNAUTHENTICATED
                  - AUTHENTICATED
                example: AUTHENTICATED
              subscriptions:
                type: array
                description: >-
                  List of current subscriptions. For DROPCOPY channel,
                  item_names contains client IDs.
                items:
                  type: object
                  properties:
                    channel:
                      type: string
                      enum:
                        - INSTRUMENT
                        - EBBO
                        - DEPTH
                        - TRADE
                        - DROPCOPY
                      example: EBBO
                    item_names:
                      type: array
                      description: >-
                        Subscribed items. For market data channels, these are
                        instrument symbols. For DROPCOPY, these are client IDs.
                      items:
                        type: string
                        example: BTC-PYUSD
        instrument:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '12345'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - INSTRUMENT
                example: INSTRUMENT
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '123456789'
                    description: Exchange assigned ID of the instrument.
                  status:
                    enum:
                      - DISABLED
                      - OPENING
                      - ACTIVE
                      - HALTED
                    type: string
                    example: ACTIVE
                    description: Current instrument state.
                  info:
                    type: object
                    properties:
                      symbol:
                        type: string
                        maxLength: 31
                        example: BTC-PYUSD
                        description: Human readable representation of the instrument.
                      reference_price:
                        type: string
                        example: '75000.50'
                        description: Price used for initial price limit/band calcuations.
                      base_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the base asset.
                      quote_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the quote asset.
                      price_limit_window_secs:
                        type: string
                        example: '3600'
                        description: Number of seconds in the price limit's sliding window.
                      price_limit_percent:
                        type: string
                        description: >-
                          Specifies the percentage threshold for price movement
                          beyond a reference price (e.g., the midpoint or
                          previous close) at which the exchange will take
                          action. If the price of a trade or order breaches this
                          threshold, the exchange may halt trading, trigger a
                          circuit breaker, or initiate other predefined actions
                          to ensure market stability.
                      price_bands_percent:
                        type: string
                        example: '0.025'
                        description: >-
                          Defines the acceptable price range for order
                          validation within the market. The price bands ensure
                          that orders are priced within a range around the
                          market's midpoint, adjusted for increments and
                          thresholds.
                  stats:
                    type: object
                    properties:
                      last_24hr_notional:
                        type: string
                        example: '4325606.30380'
                        description: >-
                          The notional (quantity * price) amount of
                          REFERENCE_ASSET traded over the last 24hr period.
                      last_24hr_quantity:
                        type: string
                        example: '123754.2345'
                        description: The quantity traded over the last 24 hour period.
        trade:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '100001'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - TRADE
                example: TRADE
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                properties:
                  match_id:
                    type: string
                    description: A unique identifier for the trade match event.
                    example: '1234576970'
                  taking_side:
                    type: string
                    description: Which side initiated the trade.
                    enum:
                      - BUY
                      - SELL
                    example: SELL
                  info:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occurred.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
        ebbo:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - EBBO
                example: EBBO
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '0987654321'
                    description: Exchange assigned ID of the market data.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  info:
                    type: object
                    properties:
                      last_trade:
                        type: object
                        description: Last trade information.
                        properties:
                          price:
                            type: string
                            example: '75.50'
                          qty:
                            type: string
                            example: '1.5'
                          timestamp:
                            type: string
                            example: ''
                            description: >-
                              The Unix UTC timestamp (in nanoseconds) when the
                              event occurred.
                      best_bid:
                        type: object
                        description: Current exchange best bid.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      best_ask:
                        type: object
                        description: Current exchange best ask.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      last_update:
                        type: string
                        example: '123478909'
                        description: >-
                          A UTC Unix epoch in nanoseconds indicating when the
                          book was last updated.
        depth:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DEPTH
                example: DEPTH
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  bids:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                  asks:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
        dropcopy:
          payload:
            type: object
            description: >-
              Order drop copy message containing order state information. This
              channel requires authentication - unauthenticated subscription
              requests will be rejected.
            properties:
              seqnum:
                type: string
                description: Per-connection sequence number for the DROPCOPY channel.
                example: '42'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DROPCOPY
                example: DROPCOPY
              update:
                type: string
                description: >-
                  Type of update for the current message. SNAPSHOT is sent upon
                  initial subscription with all active orders. UPDATE is sent
                  for subsequent order state changes.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                description: Order data representing the current state of an order.
                properties:
                  order_id:
                    type: string
                    example: '987654321'
                    description: Exchange assigned unique identifier for the order.
                  client_id:
                    type: string
                    example: '12345'
                    description: Client ID that owns this order.
                  instrument_id:
                    type: string
                    example: '111222333'
                    description: Exchange assigned ID of the instrument being traded.
                  external_id:
                    type: string
                    example: my-order-001
                    description: Client-supplied external order identifier.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  side:
                    type: string
                    enum:
                      - BUY
                      - SELL
                    example: BUY
                    description: Order side.
                  order_type:
                    type: string
                    enum:
                      - LIMIT
                      - MARKET
                      - NOTIONAL_LIMIT
                    example: LIMIT
                    description: Type of order.
                  time_in_force:
                    type: string
                    enum:
                      - GTC
                      - IOC
                    example: GTC
                    description: Time in force for the order.
                  status:
                    type: string
                    enum:
                      - NEW_PENDING
                      - ACTIVE
                      - FILLED
                      - CANCEL_PENDING
                      - CANCELED
                      - MODIFY_PENDING
                      - REJECTED
                    example: ACTIVE
                    description: Current state of the order.
                  price:
                    type: string
                    example: '50000.00'
                    description: Order price (for limit orders).
                  quantity:
                    type: string
                    example: '1.5'
                    description: Original order quantity.
                  leaves_qty:
                    type: string
                    example: '1.0'
                    description: Remaining quantity to be filled.
                  executed_qty:
                    type: string
                    example: '0.5'
                    description: Total quantity that has been executed.
                  executed_vwap:
                    type: string
                    example: '49500.00'
                    description: Volume weighted average price of executed quantity.
                  event_type:
                    type: string
                    enum:
                      - NEW
                      - TRADE
                      - CANCELED
                      - MODIFIED
                      - REJECTED
                    example: TRADE
                    description: >-
                      Type of event that triggered this update (only present on
                      UPDATE messages).
                  trade_price:
                    type: string
                    example: '50000.00'
                    description: Price of the last trade (only present on TRADE events).
                  trade_qty:
                    type: string
                    example: '0.5'
                    description: Quantity of the last trade (only present on TRADE events).
                  timestamp:
                    type: string
                    example: '1737469200000000'
                    description: UTC Unix timestamp in nanoseconds when the event occurred.
    messages:
      - payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '100001'
            channel:
              type: string
              description: Channel this message originated from.
              enum:
                - TRADE
              example: TRADE
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: UPDATE
            data:
              type: object
              properties:
                match_id:
                  type: string
                  description: A unique identifier for the trade match event.
                  example: '1234576970'
                taking_side:
                  type: string
                  description: Which side initiated the trade.
                  enum:
                    - BUY
                    - SELL
                  example: SELL
                info:
                  type: object
                  description: Last trade information.
                  properties:
                    price:
                      type: string
                      example: '75.50'
                    qty:
                      type: string
                      example: '1.5'
                    timestamp:
                      type: string
                      example: ''
                      description: >-
                        The Unix UTC timestamp (in nanoseconds) when the event
                        occurred.
                symbol:
                  type: string
                  maxLength: 31
                  example: BTC-PYUSD
                  description: Human readable representation of the instrument.
  ebbo:
    action: receive
    description: >-
      Message sent from server containing the latest exchange best bid and offer
      information for a subscribed instrument.
    channel:
      address: /api/v1
      messages:
        subscription:
          security:
            - HMAC: []
          payload:
            type: object
            required:
              - type
              - item_names
              - channels
              - timestamp
            oneOf:
              - description: >-
                  Authenticated request (`SUBSCRIBE` or `UNSUBSCRIBE`) requiring
                  credentials.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE
                      - UNSUBSCRIBE
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                required:
                  - organization_id
                  - key
                  - signature
              - description: >-
                  Unauthenticated request (`SUBSCRIBE_NO_AUTH` or
                  `UNSUBSCRIBE_NO_AUTH`) with no auth credential fields.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE_NO_AUTH
                      - UNSUBSCRIBE_NO_AUTH
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                not:
                  anyOf:
                    - required:
                        - organization_id
                      properties:
                        organization_id:
                          type: string
                    - required:
                        - key
                      properties:
                        key:
                          type: string
                    - required:
                        - signature
                      properties:
                        signature:
                          type: string
            properties:
              type:
                type: string
                description: Action the request is intending to take.
                enum:
                  - SUBSCRIBE
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE
                  - UNSUBSCRIBE_NO_AUTH
                example: SUBSCRIBE
              item_names:
                type: array
                description: >-
                  List of items the request is intending to act upon. For market
                  data channels (INSTRUMENT, EBBO, DEPTH, TRADE), this contains
                  instrument symbols. For the DROPCOPY channel, this contains
                  client IDs as strings.
                items:
                  type: string
                  example: BTC-PYUSD
              channels:
                type: array
                description: >-
                  List of channels the request is intending to interact with.
                  Note: DROPCOPY channel requires authentication.
                items:
                  type: string
                  enum:
                    - INSTRUMENT
                    - EBBO
                    - DEPTH
                    - TRADE
                    - DROPCOPY
                  example: INSTRUMENT
              timestamp:
                description: >
                  Required field on all requests; a UTC Unix epoch in seconds.
                  Must not be in the future and must be no older than 15 seconds
                  relative to server time.
                type: string
                example: '1741894773'
              organization_id:
                description: >-
                  Exchange designation ID will be UUIDv4. Must be supplied in
                  human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
              key:
                description: >-
                  Exchange supplied API key will be in UUIDv4. Must be supplied
                  in human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 6398805c-f369-40f6-ac07-94ce683056e4
              signature:
                description: The computed HMAC signature.
                type: string
                example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
        welcome:
          payload:
            type: object
            properties:
              connections:
                type: string
                description: Current number of active connections from the source IP.
                example: '3'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - WELCOME
                example: WELCOME
              message:
                type: string
                description: Message supplied when initiating a connection with the server.
                example: Welcome to True Markets!
              version:
                type: string
                description: Current version of the websocket API.
                example: 1.0.0
              datetime:
                description: Current datetime of when the server sent the message,
                type: string
                example: '2025-01-01 17:00:00'
        confirmation:
          payload:
            type: object
            properties:
              timestamp:
                type: string
                description: Server timestamp when the confirmation was generated.
                example: '1741894944'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              status:
                type: string
                description: Current status of the websocket connection.
                enum:
                  - INVALID
                  - ERROR
                  - UNAUTHORIZED
                  - UNAUTHENTICATED
                  - AUTHENTICATED
                example: AUTHENTICATED
              subscriptions:
                type: array
                description: >-
                  List of current subscriptions. For DROPCOPY channel,
                  item_names contains client IDs.
                items:
                  type: object
                  properties:
                    channel:
                      type: string
                      enum:
                        - INSTRUMENT
                        - EBBO
                        - DEPTH
                        - TRADE
                        - DROPCOPY
                      example: EBBO
                    item_names:
                      type: array
                      description: >-
                        Subscribed items. For market data channels, these are
                        instrument symbols. For DROPCOPY, these are client IDs.
                      items:
                        type: string
                        example: BTC-PYUSD
        instrument:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '12345'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - INSTRUMENT
                example: INSTRUMENT
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '123456789'
                    description: Exchange assigned ID of the instrument.
                  status:
                    enum:
                      - DISABLED
                      - OPENING
                      - ACTIVE
                      - HALTED
                    type: string
                    example: ACTIVE
                    description: Current instrument state.
                  info:
                    type: object
                    properties:
                      symbol:
                        type: string
                        maxLength: 31
                        example: BTC-PYUSD
                        description: Human readable representation of the instrument.
                      reference_price:
                        type: string
                        example: '75000.50'
                        description: Price used for initial price limit/band calcuations.
                      base_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the base asset.
                      quote_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the quote asset.
                      price_limit_window_secs:
                        type: string
                        example: '3600'
                        description: Number of seconds in the price limit's sliding window.
                      price_limit_percent:
                        type: string
                        description: >-
                          Specifies the percentage threshold for price movement
                          beyond a reference price (e.g., the midpoint or
                          previous close) at which the exchange will take
                          action. If the price of a trade or order breaches this
                          threshold, the exchange may halt trading, trigger a
                          circuit breaker, or initiate other predefined actions
                          to ensure market stability.
                      price_bands_percent:
                        type: string
                        example: '0.025'
                        description: >-
                          Defines the acceptable price range for order
                          validation within the market. The price bands ensure
                          that orders are priced within a range around the
                          market's midpoint, adjusted for increments and
                          thresholds.
                  stats:
                    type: object
                    properties:
                      last_24hr_notional:
                        type: string
                        example: '4325606.30380'
                        description: >-
                          The notional (quantity * price) amount of
                          REFERENCE_ASSET traded over the last 24hr period.
                      last_24hr_quantity:
                        type: string
                        example: '123754.2345'
                        description: The quantity traded over the last 24 hour period.
        trade:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '100001'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - TRADE
                example: TRADE
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                properties:
                  match_id:
                    type: string
                    description: A unique identifier for the trade match event.
                    example: '1234576970'
                  taking_side:
                    type: string
                    description: Which side initiated the trade.
                    enum:
                      - BUY
                      - SELL
                    example: SELL
                  info:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occurred.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
        ebbo:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - EBBO
                example: EBBO
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '0987654321'
                    description: Exchange assigned ID of the market data.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  info:
                    type: object
                    properties:
                      last_trade:
                        type: object
                        description: Last trade information.
                        properties:
                          price:
                            type: string
                            example: '75.50'
                          qty:
                            type: string
                            example: '1.5'
                          timestamp:
                            type: string
                            example: ''
                            description: >-
                              The Unix UTC timestamp (in nanoseconds) when the
                              event occurred.
                      best_bid:
                        type: object
                        description: Current exchange best bid.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      best_ask:
                        type: object
                        description: Current exchange best ask.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      last_update:
                        type: string
                        example: '123478909'
                        description: >-
                          A UTC Unix epoch in nanoseconds indicating when the
                          book was last updated.
        depth:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DEPTH
                example: DEPTH
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  bids:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                  asks:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
        dropcopy:
          payload:
            type: object
            description: >-
              Order drop copy message containing order state information. This
              channel requires authentication - unauthenticated subscription
              requests will be rejected.
            properties:
              seqnum:
                type: string
                description: Per-connection sequence number for the DROPCOPY channel.
                example: '42'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DROPCOPY
                example: DROPCOPY
              update:
                type: string
                description: >-
                  Type of update for the current message. SNAPSHOT is sent upon
                  initial subscription with all active orders. UPDATE is sent
                  for subsequent order state changes.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                description: Order data representing the current state of an order.
                properties:
                  order_id:
                    type: string
                    example: '987654321'
                    description: Exchange assigned unique identifier for the order.
                  client_id:
                    type: string
                    example: '12345'
                    description: Client ID that owns this order.
                  instrument_id:
                    type: string
                    example: '111222333'
                    description: Exchange assigned ID of the instrument being traded.
                  external_id:
                    type: string
                    example: my-order-001
                    description: Client-supplied external order identifier.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  side:
                    type: string
                    enum:
                      - BUY
                      - SELL
                    example: BUY
                    description: Order side.
                  order_type:
                    type: string
                    enum:
                      - LIMIT
                      - MARKET
                      - NOTIONAL_LIMIT
                    example: LIMIT
                    description: Type of order.
                  time_in_force:
                    type: string
                    enum:
                      - GTC
                      - IOC
                    example: GTC
                    description: Time in force for the order.
                  status:
                    type: string
                    enum:
                      - NEW_PENDING
                      - ACTIVE
                      - FILLED
                      - CANCEL_PENDING
                      - CANCELED
                      - MODIFY_PENDING
                      - REJECTED
                    example: ACTIVE
                    description: Current state of the order.
                  price:
                    type: string
                    example: '50000.00'
                    description: Order price (for limit orders).
                  quantity:
                    type: string
                    example: '1.5'
                    description: Original order quantity.
                  leaves_qty:
                    type: string
                    example: '1.0'
                    description: Remaining quantity to be filled.
                  executed_qty:
                    type: string
                    example: '0.5'
                    description: Total quantity that has been executed.
                  executed_vwap:
                    type: string
                    example: '49500.00'
                    description: Volume weighted average price of executed quantity.
                  event_type:
                    type: string
                    enum:
                      - NEW
                      - TRADE
                      - CANCELED
                      - MODIFIED
                      - REJECTED
                    example: TRADE
                    description: >-
                      Type of event that triggered this update (only present on
                      UPDATE messages).
                  trade_price:
                    type: string
                    example: '50000.00'
                    description: Price of the last trade (only present on TRADE events).
                  trade_qty:
                    type: string
                    example: '0.5'
                    description: Quantity of the last trade (only present on TRADE events).
                  timestamp:
                    type: string
                    example: '1737469200000000'
                    description: UTC Unix timestamp in nanoseconds when the event occurred.
    messages:
      - payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '20210209'
            channel:
              type: string
              description: Channel this message originated from.
              enum:
                - EBBO
              example: EBBO
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            data:
              type: object
              properties:
                id:
                  type: string
                  example: '0987654321'
                  description: Exchange assigned ID of the market data.
                symbol:
                  type: string
                  maxLength: 31
                  example: BTC-PYUSD
                  description: Human readable representation of the instrument.
                info:
                  type: object
                  properties:
                    last_trade:
                      type: object
                      description: Last trade information.
                      properties:
                        price:
                          type: string
                          example: '75.50'
                        qty:
                          type: string
                          example: '1.5'
                        timestamp:
                          type: string
                          example: ''
                          description: >-
                            The Unix UTC timestamp (in nanoseconds) when the
                            event occurred.
                    best_bid:
                      type: object
                      description: Current exchange best bid.
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                    best_ask:
                      type: object
                      description: Current exchange best ask.
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                    last_update:
                      type: string
                      example: '123478909'
                      description: >-
                        A UTC Unix epoch in nanoseconds indicating when the book
                        was last updated.
  depth:
    action: receive
    description: >-
      Message sent from server containing the latest market data change for a
      subscribed instrument.
    channel:
      address: /api/v1
      messages:
        subscription:
          security:
            - HMAC: []
          payload:
            type: object
            required:
              - type
              - item_names
              - channels
              - timestamp
            oneOf:
              - description: >-
                  Authenticated request (`SUBSCRIBE` or `UNSUBSCRIBE`) requiring
                  credentials.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE
                      - UNSUBSCRIBE
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                required:
                  - organization_id
                  - key
                  - signature
              - description: >-
                  Unauthenticated request (`SUBSCRIBE_NO_AUTH` or
                  `UNSUBSCRIBE_NO_AUTH`) with no auth credential fields.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE_NO_AUTH
                      - UNSUBSCRIBE_NO_AUTH
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                not:
                  anyOf:
                    - required:
                        - organization_id
                      properties:
                        organization_id:
                          type: string
                    - required:
                        - key
                      properties:
                        key:
                          type: string
                    - required:
                        - signature
                      properties:
                        signature:
                          type: string
            properties:
              type:
                type: string
                description: Action the request is intending to take.
                enum:
                  - SUBSCRIBE
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE
                  - UNSUBSCRIBE_NO_AUTH
                example: SUBSCRIBE
              item_names:
                type: array
                description: >-
                  List of items the request is intending to act upon. For market
                  data channels (INSTRUMENT, EBBO, DEPTH, TRADE), this contains
                  instrument symbols. For the DROPCOPY channel, this contains
                  client IDs as strings.
                items:
                  type: string
                  example: BTC-PYUSD
              channels:
                type: array
                description: >-
                  List of channels the request is intending to interact with.
                  Note: DROPCOPY channel requires authentication.
                items:
                  type: string
                  enum:
                    - INSTRUMENT
                    - EBBO
                    - DEPTH
                    - TRADE
                    - DROPCOPY
                  example: INSTRUMENT
              timestamp:
                description: >
                  Required field on all requests; a UTC Unix epoch in seconds.
                  Must not be in the future and must be no older than 15 seconds
                  relative to server time.
                type: string
                example: '1741894773'
              organization_id:
                description: >-
                  Exchange designation ID will be UUIDv4. Must be supplied in
                  human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
              key:
                description: >-
                  Exchange supplied API key will be in UUIDv4. Must be supplied
                  in human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 6398805c-f369-40f6-ac07-94ce683056e4
              signature:
                description: The computed HMAC signature.
                type: string
                example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
        welcome:
          payload:
            type: object
            properties:
              connections:
                type: string
                description: Current number of active connections from the source IP.
                example: '3'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - WELCOME
                example: WELCOME
              message:
                type: string
                description: Message supplied when initiating a connection with the server.
                example: Welcome to True Markets!
              version:
                type: string
                description: Current version of the websocket API.
                example: 1.0.0
              datetime:
                description: Current datetime of when the server sent the message,
                type: string
                example: '2025-01-01 17:00:00'
        confirmation:
          payload:
            type: object
            properties:
              timestamp:
                type: string
                description: Server timestamp when the confirmation was generated.
                example: '1741894944'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              status:
                type: string
                description: Current status of the websocket connection.
                enum:
                  - INVALID
                  - ERROR
                  - UNAUTHORIZED
                  - UNAUTHENTICATED
                  - AUTHENTICATED
                example: AUTHENTICATED
              subscriptions:
                type: array
                description: >-
                  List of current subscriptions. For DROPCOPY channel,
                  item_names contains client IDs.
                items:
                  type: object
                  properties:
                    channel:
                      type: string
                      enum:
                        - INSTRUMENT
                        - EBBO
                        - DEPTH
                        - TRADE
                        - DROPCOPY
                      example: EBBO
                    item_names:
                      type: array
                      description: >-
                        Subscribed items. For market data channels, these are
                        instrument symbols. For DROPCOPY, these are client IDs.
                      items:
                        type: string
                        example: BTC-PYUSD
        instrument:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '12345'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - INSTRUMENT
                example: INSTRUMENT
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '123456789'
                    description: Exchange assigned ID of the instrument.
                  status:
                    enum:
                      - DISABLED
                      - OPENING
                      - ACTIVE
                      - HALTED
                    type: string
                    example: ACTIVE
                    description: Current instrument state.
                  info:
                    type: object
                    properties:
                      symbol:
                        type: string
                        maxLength: 31
                        example: BTC-PYUSD
                        description: Human readable representation of the instrument.
                      reference_price:
                        type: string
                        example: '75000.50'
                        description: Price used for initial price limit/band calcuations.
                      base_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the base asset.
                      quote_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the quote asset.
                      price_limit_window_secs:
                        type: string
                        example: '3600'
                        description: Number of seconds in the price limit's sliding window.
                      price_limit_percent:
                        type: string
                        description: >-
                          Specifies the percentage threshold for price movement
                          beyond a reference price (e.g., the midpoint or
                          previous close) at which the exchange will take
                          action. If the price of a trade or order breaches this
                          threshold, the exchange may halt trading, trigger a
                          circuit breaker, or initiate other predefined actions
                          to ensure market stability.
                      price_bands_percent:
                        type: string
                        example: '0.025'
                        description: >-
                          Defines the acceptable price range for order
                          validation within the market. The price bands ensure
                          that orders are priced within a range around the
                          market's midpoint, adjusted for increments and
                          thresholds.
                  stats:
                    type: object
                    properties:
                      last_24hr_notional:
                        type: string
                        example: '4325606.30380'
                        description: >-
                          The notional (quantity * price) amount of
                          REFERENCE_ASSET traded over the last 24hr period.
                      last_24hr_quantity:
                        type: string
                        example: '123754.2345'
                        description: The quantity traded over the last 24 hour period.
        trade:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '100001'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - TRADE
                example: TRADE
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                properties:
                  match_id:
                    type: string
                    description: A unique identifier for the trade match event.
                    example: '1234576970'
                  taking_side:
                    type: string
                    description: Which side initiated the trade.
                    enum:
                      - BUY
                      - SELL
                    example: SELL
                  info:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occurred.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
        ebbo:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - EBBO
                example: EBBO
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '0987654321'
                    description: Exchange assigned ID of the market data.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  info:
                    type: object
                    properties:
                      last_trade:
                        type: object
                        description: Last trade information.
                        properties:
                          price:
                            type: string
                            example: '75.50'
                          qty:
                            type: string
                            example: '1.5'
                          timestamp:
                            type: string
                            example: ''
                            description: >-
                              The Unix UTC timestamp (in nanoseconds) when the
                              event occurred.
                      best_bid:
                        type: object
                        description: Current exchange best bid.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      best_ask:
                        type: object
                        description: Current exchange best ask.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      last_update:
                        type: string
                        example: '123478909'
                        description: >-
                          A UTC Unix epoch in nanoseconds indicating when the
                          book was last updated.
        depth:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DEPTH
                example: DEPTH
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  bids:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                  asks:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
        dropcopy:
          payload:
            type: object
            description: >-
              Order drop copy message containing order state information. This
              channel requires authentication - unauthenticated subscription
              requests will be rejected.
            properties:
              seqnum:
                type: string
                description: Per-connection sequence number for the DROPCOPY channel.
                example: '42'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DROPCOPY
                example: DROPCOPY
              update:
                type: string
                description: >-
                  Type of update for the current message. SNAPSHOT is sent upon
                  initial subscription with all active orders. UPDATE is sent
                  for subsequent order state changes.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                description: Order data representing the current state of an order.
                properties:
                  order_id:
                    type: string
                    example: '987654321'
                    description: Exchange assigned unique identifier for the order.
                  client_id:
                    type: string
                    example: '12345'
                    description: Client ID that owns this order.
                  instrument_id:
                    type: string
                    example: '111222333'
                    description: Exchange assigned ID of the instrument being traded.
                  external_id:
                    type: string
                    example: my-order-001
                    description: Client-supplied external order identifier.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  side:
                    type: string
                    enum:
                      - BUY
                      - SELL
                    example: BUY
                    description: Order side.
                  order_type:
                    type: string
                    enum:
                      - LIMIT
                      - MARKET
                      - NOTIONAL_LIMIT
                    example: LIMIT
                    description: Type of order.
                  time_in_force:
                    type: string
                    enum:
                      - GTC
                      - IOC
                    example: GTC
                    description: Time in force for the order.
                  status:
                    type: string
                    enum:
                      - NEW_PENDING
                      - ACTIVE
                      - FILLED
                      - CANCEL_PENDING
                      - CANCELED
                      - MODIFY_PENDING
                      - REJECTED
                    example: ACTIVE
                    description: Current state of the order.
                  price:
                    type: string
                    example: '50000.00'
                    description: Order price (for limit orders).
                  quantity:
                    type: string
                    example: '1.5'
                    description: Original order quantity.
                  leaves_qty:
                    type: string
                    example: '1.0'
                    description: Remaining quantity to be filled.
                  executed_qty:
                    type: string
                    example: '0.5'
                    description: Total quantity that has been executed.
                  executed_vwap:
                    type: string
                    example: '49500.00'
                    description: Volume weighted average price of executed quantity.
                  event_type:
                    type: string
                    enum:
                      - NEW
                      - TRADE
                      - CANCELED
                      - MODIFIED
                      - REJECTED
                    example: TRADE
                    description: >-
                      Type of event that triggered this update (only present on
                      UPDATE messages).
                  trade_price:
                    type: string
                    example: '50000.00'
                    description: Price of the last trade (only present on TRADE events).
                  trade_qty:
                    type: string
                    example: '0.5'
                    description: Quantity of the last trade (only present on TRADE events).
                  timestamp:
                    type: string
                    example: '1737469200000000'
                    description: UTC Unix timestamp in nanoseconds when the event occurred.
    messages:
      - payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '20210209'
            channel:
              type: string
              description: Channel this message originated from.
              enum:
                - DEPTH
              example: DEPTH
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            data:
              type: object
              properties:
                symbol:
                  type: string
                  maxLength: 31
                  example: BTC-PYUSD
                  description: Human readable representation of the instrument.
                bids:
                  type: array
                  items:
                    type: object
                    properties:
                      price:
                        type: string
                        example: '110865.50'
                        description: Price at this level.
                      qty:
                        type: string
                        example: '0.00018'
                        description: Aggregate quantity resting at this level.
                      depth:
                        type: string
                        example: '10'
                        description: Number of orders resting at this level.
                asks:
                  type: array
                  items:
                    type: object
                    properties:
                      price:
                        type: string
                        example: '110865.50'
                        description: Price at this level.
                      qty:
                        type: string
                        example: '0.00018'
                        description: Aggregate quantity resting at this level.
                      depth:
                        type: string
                        example: '10'
                        description: Number of orders resting at this level.
  dropcopy:
    action: receive
    description: >-
      Message sent from server containing order drop copy data for subscribed
      client IDs. Provides real-time order state updates including new orders,
      fills, cancellations, and modifications. **Requires authentication** -
      unauthenticated connections will be rejected.
    channel:
      address: /api/v1
      messages:
        subscription:
          security:
            - HMAC: []
          payload:
            type: object
            required:
              - type
              - item_names
              - channels
              - timestamp
            oneOf:
              - description: >-
                  Authenticated request (`SUBSCRIBE` or `UNSUBSCRIBE`) requiring
                  credentials.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE
                      - UNSUBSCRIBE
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                required:
                  - organization_id
                  - key
                  - signature
              - description: >-
                  Unauthenticated request (`SUBSCRIBE_NO_AUTH` or
                  `UNSUBSCRIBE_NO_AUTH`) with no auth credential fields.
                properties:
                  type:
                    enum:
                      - SUBSCRIBE_NO_AUTH
                      - UNSUBSCRIBE_NO_AUTH
                  organization_id:
                    type: string
                  key:
                    type: string
                  signature:
                    type: string
                not:
                  anyOf:
                    - required:
                        - organization_id
                      properties:
                        organization_id:
                          type: string
                    - required:
                        - key
                      properties:
                        key:
                          type: string
                    - required:
                        - signature
                      properties:
                        signature:
                          type: string
            properties:
              type:
                type: string
                description: Action the request is intending to take.
                enum:
                  - SUBSCRIBE
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE
                  - UNSUBSCRIBE_NO_AUTH
                example: SUBSCRIBE
              item_names:
                type: array
                description: >-
                  List of items the request is intending to act upon. For market
                  data channels (INSTRUMENT, EBBO, DEPTH, TRADE), this contains
                  instrument symbols. For the DROPCOPY channel, this contains
                  client IDs as strings.
                items:
                  type: string
                  example: BTC-PYUSD
              channels:
                type: array
                description: >-
                  List of channels the request is intending to interact with.
                  Note: DROPCOPY channel requires authentication.
                items:
                  type: string
                  enum:
                    - INSTRUMENT
                    - EBBO
                    - DEPTH
                    - TRADE
                    - DROPCOPY
                  example: INSTRUMENT
              timestamp:
                description: >
                  Required field on all requests; a UTC Unix epoch in seconds.
                  Must not be in the future and must be no older than 15 seconds
                  relative to server time.
                type: string
                example: '1741894773'
              organization_id:
                description: >-
                  Exchange designation ID will be UUIDv4. Must be supplied in
                  human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
              key:
                description: >-
                  Exchange supplied API key will be in UUIDv4. Must be supplied
                  in human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 6398805c-f369-40f6-ac07-94ce683056e4
              signature:
                description: The computed HMAC signature.
                type: string
                example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
        welcome:
          payload:
            type: object
            properties:
              connections:
                type: string
                description: Current number of active connections from the source IP.
                example: '3'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - WELCOME
                example: WELCOME
              message:
                type: string
                description: Message supplied when initiating a connection with the server.
                example: Welcome to True Markets!
              version:
                type: string
                description: Current version of the websocket API.
                example: 1.0.0
              datetime:
                description: Current datetime of when the server sent the message,
                type: string
                example: '2025-01-01 17:00:00'
        confirmation:
          payload:
            type: object
            properties:
              timestamp:
                type: string
                description: Server timestamp when the confirmation was generated.
                example: '1741894944'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              status:
                type: string
                description: Current status of the websocket connection.
                enum:
                  - INVALID
                  - ERROR
                  - UNAUTHORIZED
                  - UNAUTHENTICATED
                  - AUTHENTICATED
                example: AUTHENTICATED
              subscriptions:
                type: array
                description: >-
                  List of current subscriptions. For DROPCOPY channel,
                  item_names contains client IDs.
                items:
                  type: object
                  properties:
                    channel:
                      type: string
                      enum:
                        - INSTRUMENT
                        - EBBO
                        - DEPTH
                        - TRADE
                        - DROPCOPY
                      example: EBBO
                    item_names:
                      type: array
                      description: >-
                        Subscribed items. For market data channels, these are
                        instrument symbols. For DROPCOPY, these are client IDs.
                      items:
                        type: string
                        example: BTC-PYUSD
        instrument:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '12345'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - INSTRUMENT
                example: INSTRUMENT
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '123456789'
                    description: Exchange assigned ID of the instrument.
                  status:
                    enum:
                      - DISABLED
                      - OPENING
                      - ACTIVE
                      - HALTED
                    type: string
                    example: ACTIVE
                    description: Current instrument state.
                  info:
                    type: object
                    properties:
                      symbol:
                        type: string
                        maxLength: 31
                        example: BTC-PYUSD
                        description: Human readable representation of the instrument.
                      reference_price:
                        type: string
                        example: '75000.50'
                        description: Price used for initial price limit/band calcuations.
                      base_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the base asset.
                      quote_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the quote asset.
                      price_limit_window_secs:
                        type: string
                        example: '3600'
                        description: Number of seconds in the price limit's sliding window.
                      price_limit_percent:
                        type: string
                        description: >-
                          Specifies the percentage threshold for price movement
                          beyond a reference price (e.g., the midpoint or
                          previous close) at which the exchange will take
                          action. If the price of a trade or order breaches this
                          threshold, the exchange may halt trading, trigger a
                          circuit breaker, or initiate other predefined actions
                          to ensure market stability.
                      price_bands_percent:
                        type: string
                        example: '0.025'
                        description: >-
                          Defines the acceptable price range for order
                          validation within the market. The price bands ensure
                          that orders are priced within a range around the
                          market's midpoint, adjusted for increments and
                          thresholds.
                  stats:
                    type: object
                    properties:
                      last_24hr_notional:
                        type: string
                        example: '4325606.30380'
                        description: >-
                          The notional (quantity * price) amount of
                          REFERENCE_ASSET traded over the last 24hr period.
                      last_24hr_quantity:
                        type: string
                        example: '123754.2345'
                        description: The quantity traded over the last 24 hour period.
        trade:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '100001'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - TRADE
                example: TRADE
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                properties:
                  match_id:
                    type: string
                    description: A unique identifier for the trade match event.
                    example: '1234576970'
                  taking_side:
                    type: string
                    description: Which side initiated the trade.
                    enum:
                      - BUY
                      - SELL
                    example: SELL
                  info:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occurred.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
        ebbo:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - EBBO
                example: EBBO
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '0987654321'
                    description: Exchange assigned ID of the market data.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  info:
                    type: object
                    properties:
                      last_trade:
                        type: object
                        description: Last trade information.
                        properties:
                          price:
                            type: string
                            example: '75.50'
                          qty:
                            type: string
                            example: '1.5'
                          timestamp:
                            type: string
                            example: ''
                            description: >-
                              The Unix UTC timestamp (in nanoseconds) when the
                              event occurred.
                      best_bid:
                        type: object
                        description: Current exchange best bid.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      best_ask:
                        type: object
                        description: Current exchange best ask.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      last_update:
                        type: string
                        example: '123478909'
                        description: >-
                          A UTC Unix epoch in nanoseconds indicating when the
                          book was last updated.
        depth:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DEPTH
                example: DEPTH
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  bids:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                  asks:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
        dropcopy:
          payload:
            type: object
            description: >-
              Order drop copy message containing order state information. This
              channel requires authentication - unauthenticated subscription
              requests will be rejected.
            properties:
              seqnum:
                type: string
                description: Per-connection sequence number for the DROPCOPY channel.
                example: '42'
              channel:
                type: string
                description: Channel this message originated from.
                enum:
                  - DROPCOPY
                example: DROPCOPY
              update:
                type: string
                description: >-
                  Type of update for the current message. SNAPSHOT is sent upon
                  initial subscription with all active orders. UPDATE is sent
                  for subsequent order state changes.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                description: Order data representing the current state of an order.
                properties:
                  order_id:
                    type: string
                    example: '987654321'
                    description: Exchange assigned unique identifier for the order.
                  client_id:
                    type: string
                    example: '12345'
                    description: Client ID that owns this order.
                  instrument_id:
                    type: string
                    example: '111222333'
                    description: Exchange assigned ID of the instrument being traded.
                  external_id:
                    type: string
                    example: my-order-001
                    description: Client-supplied external order identifier.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  side:
                    type: string
                    enum:
                      - BUY
                      - SELL
                    example: BUY
                    description: Order side.
                  order_type:
                    type: string
                    enum:
                      - LIMIT
                      - MARKET
                      - NOTIONAL_LIMIT
                    example: LIMIT
                    description: Type of order.
                  time_in_force:
                    type: string
                    enum:
                      - GTC
                      - IOC
                    example: GTC
                    description: Time in force for the order.
                  status:
                    type: string
                    enum:
                      - NEW_PENDING
                      - ACTIVE
                      - FILLED
                      - CANCEL_PENDING
                      - CANCELED
                      - MODIFY_PENDING
                      - REJECTED
                    example: ACTIVE
                    description: Current state of the order.
                  price:
                    type: string
                    example: '50000.00'
                    description: Order price (for limit orders).
                  quantity:
                    type: string
                    example: '1.5'
                    description: Original order quantity.
                  leaves_qty:
                    type: string
                    example: '1.0'
                    description: Remaining quantity to be filled.
                  executed_qty:
                    type: string
                    example: '0.5'
                    description: Total quantity that has been executed.
                  executed_vwap:
                    type: string
                    example: '49500.00'
                    description: Volume weighted average price of executed quantity.
                  event_type:
                    type: string
                    enum:
                      - NEW
                      - TRADE
                      - CANCELED
                      - MODIFIED
                      - REJECTED
                    example: TRADE
                    description: >-
                      Type of event that triggered this update (only present on
                      UPDATE messages).
                  trade_price:
                    type: string
                    example: '50000.00'
                    description: Price of the last trade (only present on TRADE events).
                  trade_qty:
                    type: string
                    example: '0.5'
                    description: Quantity of the last trade (only present on TRADE events).
                  timestamp:
                    type: string
                    example: '1737469200000000'
                    description: UTC Unix timestamp in nanoseconds when the event occurred.
    messages:
      - payload:
          type: object
          description: >-
            Order drop copy message containing order state information. This
            channel requires authentication - unauthenticated subscription
            requests will be rejected.
          properties:
            seqnum:
              type: string
              description: Per-connection sequence number for the DROPCOPY channel.
              example: '42'
            channel:
              type: string
              description: Channel this message originated from.
              enum:
                - DROPCOPY
              example: DROPCOPY
            update:
              type: string
              description: >-
                Type of update for the current message. SNAPSHOT is sent upon
                initial subscription with all active orders. UPDATE is sent for
                subsequent order state changes.
              enum:
                - SNAPSHOT
                - UPDATE
              example: UPDATE
            data:
              type: object
              description: Order data representing the current state of an order.
              properties:
                order_id:
                  type: string
                  example: '987654321'
                  description: Exchange assigned unique identifier for the order.
                client_id:
                  type: string
                  example: '12345'
                  description: Client ID that owns this order.
                instrument_id:
                  type: string
                  example: '111222333'
                  description: Exchange assigned ID of the instrument being traded.
                external_id:
                  type: string
                  example: my-order-001
                  description: Client-supplied external order identifier.
                symbol:
                  type: string
                  maxLength: 31
                  example: BTC-PYUSD
                  description: Human readable representation of the instrument.
                side:
                  type: string
                  enum:
                    - BUY
                    - SELL
                  example: BUY
                  description: Order side.
                order_type:
                  type: string
                  enum:
                    - LIMIT
                    - MARKET
                    - NOTIONAL_LIMIT
                  example: LIMIT
                  description: Type of order.
                time_in_force:
                  type: string
                  enum:
                    - GTC
                    - IOC
                  example: GTC
                  description: Time in force for the order.
                status:
                  type: string
                  enum:
                    - NEW_PENDING
                    - ACTIVE
                    - FILLED
                    - CANCEL_PENDING
                    - CANCELED
                    - MODIFY_PENDING
                    - REJECTED
                  example: ACTIVE
                  description: Current state of the order.
                price:
                  type: string
                  example: '50000.00'
                  description: Order price (for limit orders).
                quantity:
                  type: string
                  example: '1.5'
                  description: Original order quantity.
                leaves_qty:
                  type: string
                  example: '1.0'
                  description: Remaining quantity to be filled.
                executed_qty:
                  type: string
                  example: '0.5'
                  description: Total quantity that has been executed.
                executed_vwap:
                  type: string
                  example: '49500.00'
                  description: Volume weighted average price of executed quantity.
                event_type:
                  type: string
                  enum:
                    - NEW
                    - TRADE
                    - CANCELED
                    - MODIFIED
                    - REJECTED
                  example: TRADE
                  description: >-
                    Type of event that triggered this update (only present on
                    UPDATE messages).
                trade_price:
                  type: string
                  example: '50000.00'
                  description: Price of the last trade (only present on TRADE events).
                trade_qty:
                  type: string
                  example: '0.5'
                  description: Quantity of the last trade (only present on TRADE events).
                timestamp:
                  type: string
                  example: '1737469200000000'
                  description: UTC Unix timestamp in nanoseconds when the event occurred.
components:
  servers:
    uat:
      host: uat.truex.co
      protocol: wss
      description: UAT websocket sandbox server.
      security:
        - type: httpApiKey
          in: query
          name: x-no-auth
          description: >
            This security scheme documents message-level behavior.
            Authentication fields are carried in the subscription message
            payload, not as HTTP query parameters.


            Clients may subscribe to endpoints without an API key or computing
            an HMAC signature. These endpoints are rate limited by the server,
            coalescing and only sending data at a predetermined rate.
            Non-authenticated connections can be upgraded by supplying an API
            key and computed HMAC signature on the next request sent to the
            server.


            Unauthenticated requests must have type `SUBSCRIBE_NO_AUTH` or
            `UNSUBSCRIBE_NO_AUTH` and must not include the following fields in
            the request: `organization_id`, `key`, `signature`.


            `*_NO_AUTH` requests are only valid on unauthenticated sessions. If
            a connection is already authenticated, no-auth requests are rejected
            and do not modify authenticated subscriptions.


            ### Required members
              * `timestamp`: A UTC Unix epoch in seconds.
        - type: httpApiKey
          in: query
          name: x-api-key
          description: >
            This security scheme documents message-level behavior.
            Authentication fields are carried in the subscription message
            payload, not as HTTP query parameters.


            Clients must compute and send an HMAC signature in the `signature`
            member of the request structure.


            Compute the payload exactly as:


            `timestamp + TRUEXWS + key + path`


            Then compute the signature as:


            `Base64( HMAC_SHA256(secret, payload) )`


            Rules:

            * `timestamp` is a Unix epoch in **seconds**.

            * `TRUEXWS` is the literal string `TRUEXWS`.

            * `key` is the API key UUID string.

            * `path` is everything after the domain, including leading `/` (e.g.
            `/api/v1`).

            * Timestamp must not be in the future and must be no older than 15
            seconds relative to server time.


            Example payload:

            * `1700000000TRUEXWS11112222-3333-4444-8555-666677778888/api/v1`


            Example signature (shell):

            * `printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$SECRET"
            -binary | base64`


            ### Required members

            * `signature`: The signature generated from processing the payload
            with the HMAC key.

            * `key`: The ID of the HMAC key being used.

            * `timestamp`: A UTC Unix epoch in seconds.
    production:
      host: prod.truex.co
      protocol: wss
      description: Production websocket server.
      security:
        - type: httpApiKey
          in: query
          name: x-no-auth
          description: >
            This security scheme documents message-level behavior.
            Authentication fields are carried in the subscription message
            payload, not as HTTP query parameters.


            Clients may subscribe to endpoints without an API key or computing
            an HMAC signature. These endpoints are rate limited by the server,
            coalescing and only sending data at a predetermined rate.
            Non-authenticated connections can be upgraded by supplying an API
            key and computed HMAC signature on the next request sent to the
            server.


            Unauthenticated requests must have type `SUBSCRIBE_NO_AUTH` or
            `UNSUBSCRIBE_NO_AUTH` and must not include the following fields in
            the request: `organization_id`, `key`, `signature`.


            `*_NO_AUTH` requests are only valid on unauthenticated sessions. If
            a connection is already authenticated, no-auth requests are rejected
            and do not modify authenticated subscriptions.


            ### Required members
              * `timestamp`: A UTC Unix epoch in seconds.
        - type: httpApiKey
          in: query
          name: x-api-key
          description: >
            This security scheme documents message-level behavior.
            Authentication fields are carried in the subscription message
            payload, not as HTTP query parameters.


            Clients must compute and send an HMAC signature in the `signature`
            member of the request structure.


            Compute the payload exactly as:


            `timestamp + TRUEXWS + key + path`


            Then compute the signature as:


            `Base64( HMAC_SHA256(secret, payload) )`


            Rules:

            * `timestamp` is a Unix epoch in **seconds**.

            * `TRUEXWS` is the literal string `TRUEXWS`.

            * `key` is the API key UUID string.

            * `path` is everything after the domain, including leading `/` (e.g.
            `/api/v1`).

            * Timestamp must not be in the future and must be no older than 15
            seconds relative to server time.


            Example payload:

            * `1700000000TRUEXWS11112222-3333-4444-8555-666677778888/api/v1`


            Example signature (shell):

            * `printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$SECRET"
            -binary | base64`


            ### Required members

            * `signature`: The signature generated from processing the payload
            with the HMAC key.

            * `key`: The ID of the HMAC key being used.

            * `timestamp`: A UTC Unix epoch in seconds.
  schemas:
    MarketQuote:
      type: object
      properties:
        price:
          type: string
          example: '75.50'
        qty:
          type: string
          example: '1.5'
        timestamp:
          type: string
          example: ''
          description: The Unix UTC timestamp (in nanoseconds) when the event occurred.
    MarketLevel:
      type: object
      properties:
        price:
          type: string
          example: '110865.50'
          description: Price at this level.
        qty:
          type: string
          example: '0.00018'
          description: Aggregate quantity resting at this level.
        depth:
          type: string
          example: '10'
          description: Number of orders resting at this level.
    Trade:
      type: object
      properties:
        match_id:
          type: string
          description: A unique identifier for the trade match event.
          example: '1234576970'
        taking_side:
          type: string
          description: Which side initiated the trade.
          enum:
            - BUY
            - SELL
          example: SELL
        info:
          type: object
          description: Last trade information.
          properties:
            price:
              type: string
              example: '75.50'
            qty:
              type: string
              example: '1.5'
            timestamp:
              type: string
              example: ''
              description: The Unix UTC timestamp (in nanoseconds) when the event occurred.
        symbol:
          type: string
          maxLength: 31
          example: BTC-PYUSD
          description: Human readable representation of the instrument.
    MarketData:
      type: object
      properties:
        id:
          type: string
          example: '0987654321'
          description: Exchange assigned ID of the market data.
        symbol:
          type: string
          maxLength: 31
          example: BTC-PYUSD
          description: Human readable representation of the instrument.
        info:
          type: object
          properties:
            last_trade:
              type: object
              description: Last trade information.
              properties:
                price:
                  type: string
                  example: '75.50'
                qty:
                  type: string
                  example: '1.5'
                timestamp:
                  type: string
                  example: ''
                  description: >-
                    The Unix UTC timestamp (in nanoseconds) when the event
                    occurred.
            best_bid:
              type: object
              description: Current exchange best bid.
              properties:
                price:
                  type: string
                  example: '110865.50'
                  description: Price at this level.
                qty:
                  type: string
                  example: '0.00018'
                  description: Aggregate quantity resting at this level.
                depth:
                  type: string
                  example: '10'
                  description: Number of orders resting at this level.
            best_ask:
              type: object
              description: Current exchange best ask.
              properties:
                price:
                  type: string
                  example: '110865.50'
                  description: Price at this level.
                qty:
                  type: string
                  example: '0.00018'
                  description: Aggregate quantity resting at this level.
                depth:
                  type: string
                  example: '10'
                  description: Number of orders resting at this level.
            last_update:
              type: string
              example: '123478909'
              description: >-
                A UTC Unix epoch in nanoseconds indicating when the book was
                last updated.
    InstrumentStat:
      type: object
      properties:
        last_24hr_notional:
          type: string
          example: '4325606.30380'
          description: >-
            The notional (quantity * price) amount of REFERENCE_ASSET traded
            over the last 24hr period.
        last_24hr_quantity:
          type: string
          example: '123754.2345'
          description: The quantity traded over the last 24 hour period.
    Instrument:
      type: object
      properties:
        id:
          type: string
          example: '123456789'
          description: Exchange assigned ID of the instrument.
        status:
          enum:
            - DISABLED
            - OPENING
            - ACTIVE
            - HALTED
          type: string
          example: ACTIVE
          description: Current instrument state.
        info:
          type: object
          properties:
            symbol:
              type: string
              maxLength: 31
              example: BTC-PYUSD
              description: Human readable representation of the instrument.
            reference_price:
              type: string
              example: '75000.50'
              description: Price used for initial price limit/band calcuations.
            base_asset_id:
              type: string
              example: '123456789'
              description: ID of the base asset.
            quote_asset_id:
              type: string
              example: '123456789'
              description: ID of the quote asset.
            price_limit_window_secs:
              type: string
              example: '3600'
              description: Number of seconds in the price limit's sliding window.
            price_limit_percent:
              type: string
              description: >-
                Specifies the percentage threshold for price movement beyond a
                reference price (e.g., the midpoint or previous close) at which
                the exchange will take action. If the price of a trade or order
                breaches this threshold, the exchange may halt trading, trigger
                a circuit breaker, or initiate other predefined actions to
                ensure market stability.
            price_bands_percent:
              type: string
              example: '0.025'
              description: >-
                Defines the acceptable price range for order validation within
                the market. The price bands ensure that orders are priced within
                a range around the market's midpoint, adjusted for increments
                and thresholds.
        stats:
          type: object
          properties:
            last_24hr_notional:
              type: string
              example: '4325606.30380'
              description: >-
                The notional (quantity * price) amount of REFERENCE_ASSET traded
                over the last 24hr period.
            last_24hr_quantity:
              type: string
              example: '123754.2345'
              description: The quantity traded over the last 24 hour period.
    Order:
      type: object
      description: Order data representing the current state of an order.
      properties:
        order_id:
          type: string
          example: '987654321'
          description: Exchange assigned unique identifier for the order.
        client_id:
          type: string
          example: '12345'
          description: Client ID that owns this order.
        instrument_id:
          type: string
          example: '111222333'
          description: Exchange assigned ID of the instrument being traded.
        external_id:
          type: string
          example: my-order-001
          description: Client-supplied external order identifier.
        symbol:
          type: string
          maxLength: 31
          example: BTC-PYUSD
          description: Human readable representation of the instrument.
        side:
          type: string
          enum:
            - BUY
            - SELL
          example: BUY
          description: Order side.
        order_type:
          type: string
          enum:
            - LIMIT
            - MARKET
            - NOTIONAL_LIMIT
          example: LIMIT
          description: Type of order.
        time_in_force:
          type: string
          enum:
            - GTC
            - IOC
          example: GTC
          description: Time in force for the order.
        status:
          type: string
          enum:
            - NEW_PENDING
            - ACTIVE
            - FILLED
            - CANCEL_PENDING
            - CANCELED
            - MODIFY_PENDING
            - REJECTED
          example: ACTIVE
          description: Current state of the order.
        price:
          type: string
          example: '50000.00'
          description: Order price (for limit orders).
        quantity:
          type: string
          example: '1.5'
          description: Original order quantity.
        leaves_qty:
          type: string
          example: '1.0'
          description: Remaining quantity to be filled.
        executed_qty:
          type: string
          example: '0.5'
          description: Total quantity that has been executed.
        executed_vwap:
          type: string
          example: '49500.00'
          description: Volume weighted average price of executed quantity.
        event_type:
          type: string
          enum:
            - NEW
            - TRADE
            - CANCELED
            - MODIFIED
            - REJECTED
          example: TRADE
          description: >-
            Type of event that triggered this update (only present on UPDATE
            messages).
        trade_price:
          type: string
          example: '50000.00'
          description: Price of the last trade (only present on TRADE events).
        trade_qty:
          type: string
          example: '0.5'
          description: Quantity of the last trade (only present on TRADE events).
        timestamp:
          type: string
          example: '1737469200000000'
          description: UTC Unix timestamp in nanoseconds when the event occurred.
  messages:
    subscription:
      payload:
        type: object
        required:
          - type
          - item_names
          - channels
          - timestamp
        oneOf:
          - description: >-
              Authenticated request (`SUBSCRIBE` or `UNSUBSCRIBE`) requiring
              credentials.
            properties:
              type:
                enum:
                  - SUBSCRIBE
                  - UNSUBSCRIBE
              organization_id:
                type: string
              key:
                type: string
              signature:
                type: string
            required:
              - organization_id
              - key
              - signature
          - description: >-
              Unauthenticated request (`SUBSCRIBE_NO_AUTH` or
              `UNSUBSCRIBE_NO_AUTH`) with no auth credential fields.
            properties:
              type:
                enum:
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE_NO_AUTH
              organization_id:
                type: string
              key:
                type: string
              signature:
                type: string
            not:
              anyOf:
                - required:
                    - organization_id
                  properties:
                    organization_id:
                      type: string
                - required:
                    - key
                  properties:
                    key:
                      type: string
                - required:
                    - signature
                  properties:
                    signature:
                      type: string
        properties:
          type:
            type: string
            description: Action the request is intending to take.
            enum:
              - SUBSCRIBE
              - SUBSCRIBE_NO_AUTH
              - UNSUBSCRIBE
              - UNSUBSCRIBE_NO_AUTH
            example: SUBSCRIBE
          item_names:
            type: array
            description: >-
              List of items the request is intending to act upon. For market
              data channels (INSTRUMENT, EBBO, DEPTH, TRADE), this contains
              instrument symbols. For the DROPCOPY channel, this contains client
              IDs as strings.
            items:
              type: string
              example: BTC-PYUSD
          channels:
            type: array
            description: >-
              List of channels the request is intending to interact with. Note:
              DROPCOPY channel requires authentication.
            items:
              type: string
              enum:
                - INSTRUMENT
                - EBBO
                - DEPTH
                - TRADE
                - DROPCOPY
              example: INSTRUMENT
          timestamp:
            description: >
              Required field on all requests; a UTC Unix epoch in seconds. Must
              not be in the future and must be no older than 15 seconds relative
              to server time.
            type: string
            example: '1741894773'
          organization_id:
            description: >-
              Exchange designation ID will be UUIDv4. Must be supplied in human
              readable form. [RFC
              9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
            type: string
            example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
          key:
            description: >-
              Exchange supplied API key will be in UUIDv4. Must be supplied in
              human readable form. [RFC
              9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
            type: string
            example: 6398805c-f369-40f6-ac07-94ce683056e4
          signature:
            description: The computed HMAC signature.
            type: string
            example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
    welcome:
      payload:
        type: object
        properties:
          connections:
            type: string
            description: Current number of active connections from the source IP.
            example: '3'
          channel:
            type: string
            description: Channel this message originated from.
            enum:
              - WEBSOCKET
            example: WEBSOCKET
          update:
            type: string
            description: Type of update for the current message.
            enum:
              - WELCOME
            example: WELCOME
          message:
            type: string
            description: Message supplied when initiating a connection with the server.
            example: Welcome to True Markets!
          version:
            type: string
            description: Current version of the websocket API.
            example: 1.0.0
          datetime:
            description: Current datetime of when the server sent the message,
            type: string
            example: '2025-01-01 17:00:00'
    confirmation:
      payload:
        type: object
        properties:
          timestamp:
            type: string
            description: Server timestamp when the confirmation was generated.
            example: '1741894944'
          channel:
            type: string
            description: Channel this message originated from.
            enum:
              - WEBSOCKET
            example: WEBSOCKET
          update:
            type: string
            description: Type of update for the current message.
            enum:
              - SNAPSHOT
              - UPDATE
            example: SNAPSHOT
          status:
            type: string
            description: Current status of the websocket connection.
            enum:
              - INVALID
              - ERROR
              - UNAUTHORIZED
              - UNAUTHENTICATED
              - AUTHENTICATED
            example: AUTHENTICATED
          subscriptions:
            type: array
            description: >-
              List of current subscriptions. For DROPCOPY channel, item_names
              contains client IDs.
            items:
              type: object
              properties:
                channel:
                  type: string
                  enum:
                    - INSTRUMENT
                    - EBBO
                    - DEPTH
                    - TRADE
                    - DROPCOPY
                  example: EBBO
                item_names:
                  type: array
                  description: >-
                    Subscribed items. For market data channels, these are
                    instrument symbols. For DROPCOPY, these are client IDs.
                  items:
                    type: string
                    example: BTC-PYUSD
    instrument:
      payload:
        type: object
        properties:
          seqnum:
            type: string
            description: Current sequence number of the channel.
            example: '12345'
          channel:
            type: string
            description: Channel this message originated from.
            enum:
              - INSTRUMENT
            example: INSTRUMENT
          update:
            type: string
            description: Type of update for the current message.
            enum:
              - SNAPSHOT
              - UPDATE
            example: SNAPSHOT
          data:
            type: object
            properties:
              id:
                type: string
                example: '123456789'
                description: Exchange assigned ID of the instrument.
              status:
                enum:
                  - DISABLED
                  - OPENING
                  - ACTIVE
                  - HALTED
                type: string
                example: ACTIVE
                description: Current instrument state.
              info:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  reference_price:
                    type: string
                    example: '75000.50'
                    description: Price used for initial price limit/band calcuations.
                  base_asset_id:
                    type: string
                    example: '123456789'
                    description: ID of the base asset.
                  quote_asset_id:
                    type: string
                    example: '123456789'
                    description: ID of the quote asset.
                  price_limit_window_secs:
                    type: string
                    example: '3600'
                    description: Number of seconds in the price limit's sliding window.
                  price_limit_percent:
                    type: string
                    description: >-
                      Specifies the percentage threshold for price movement
                      beyond a reference price (e.g., the midpoint or previous
                      close) at which the exchange will take action. If the
                      price of a trade or order breaches this threshold, the
                      exchange may halt trading, trigger a circuit breaker, or
                      initiate other predefined actions to ensure market
                      stability.
                  price_bands_percent:
                    type: string
                    example: '0.025'
                    description: >-
                      Defines the acceptable price range for order validation
                      within the market. The price bands ensure that orders are
                      priced within a range around the market's midpoint,
                      adjusted for increments and thresholds.
              stats:
                type: object
                properties:
                  last_24hr_notional:
                    type: string
                    example: '4325606.30380'
                    description: >-
                      The notional (quantity * price) amount of REFERENCE_ASSET
                      traded over the last 24hr period.
                  last_24hr_quantity:
                    type: string
                    example: '123754.2345'
                    description: The quantity traded over the last 24 hour period.
    trade:
      payload:
        type: object
        properties:
          seqnum:
            type: string
            description: Current sequence number of the channel.
            example: '100001'
          channel:
            type: string
            description: Channel this message originated from.
            enum:
              - TRADE
            example: TRADE
          update:
            type: string
            description: Type of update for the current message.
            enum:
              - SNAPSHOT
              - UPDATE
            example: UPDATE
          data:
            type: object
            properties:
              match_id:
                type: string
                description: A unique identifier for the trade match event.
                example: '1234576970'
              taking_side:
                type: string
                description: Which side initiated the trade.
                enum:
                  - BUY
                  - SELL
                example: SELL
              info:
                type: object
                description: Last trade information.
                properties:
                  price:
                    type: string
                    example: '75.50'
                  qty:
                    type: string
                    example: '1.5'
                  timestamp:
                    type: string
                    example: ''
                    description: >-
                      The Unix UTC timestamp (in nanoseconds) when the event
                      occurred.
              symbol:
                type: string
                maxLength: 31
                example: BTC-PYUSD
                description: Human readable representation of the instrument.
    ebbo:
      payload:
        type: object
        properties:
          seqnum:
            type: string
            description: Current sequence number of the channel.
            example: '20210209'
          channel:
            type: string
            description: Channel this message originated from.
            enum:
              - EBBO
            example: EBBO
          update:
            type: string
            description: Type of update for the current message.
            enum:
              - SNAPSHOT
              - UPDATE
            example: SNAPSHOT
          data:
            type: object
            properties:
              id:
                type: string
                example: '0987654321'
                description: Exchange assigned ID of the market data.
              symbol:
                type: string
                maxLength: 31
                example: BTC-PYUSD
                description: Human readable representation of the instrument.
              info:
                type: object
                properties:
                  last_trade:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occurred.
                  best_bid:
                    type: object
                    description: Current exchange best bid.
                    properties:
                      price:
                        type: string
                        example: '110865.50'
                        description: Price at this level.
                      qty:
                        type: string
                        example: '0.00018'
                        description: Aggregate quantity resting at this level.
                      depth:
                        type: string
                        example: '10'
                        description: Number of orders resting at this level.
                  best_ask:
                    type: object
                    description: Current exchange best ask.
                    properties:
                      price:
                        type: string
                        example: '110865.50'
                        description: Price at this level.
                      qty:
                        type: string
                        example: '0.00018'
                        description: Aggregate quantity resting at this level.
                      depth:
                        type: string
                        example: '10'
                        description: Number of orders resting at this level.
                  last_update:
                    type: string
                    example: '123478909'
                    description: >-
                      A UTC Unix epoch in nanoseconds indicating when the book
                      was last updated.
    depth:
      payload:
        type: object
        properties:
          seqnum:
            type: string
            description: Current sequence number of the channel.
            example: '20210209'
          channel:
            type: string
            description: Channel this message originated from.
            enum:
              - DEPTH
            example: DEPTH
          update:
            type: string
            description: Type of update for the current message.
            enum:
              - SNAPSHOT
              - UPDATE
            example: SNAPSHOT
          data:
            type: object
            properties:
              symbol:
                type: string
                maxLength: 31
                example: BTC-PYUSD
                description: Human readable representation of the instrument.
              bids:
                type: array
                items:
                  type: object
                  properties:
                    price:
                      type: string
                      example: '110865.50'
                      description: Price at this level.
                    qty:
                      type: string
                      example: '0.00018'
                      description: Aggregate quantity resting at this level.
                    depth:
                      type: string
                      example: '10'
                      description: Number of orders resting at this level.
              asks:
                type: array
                items:
                  type: object
                  properties:
                    price:
                      type: string
                      example: '110865.50'
                      description: Price at this level.
                    qty:
                      type: string
                      example: '0.00018'
                      description: Aggregate quantity resting at this level.
                    depth:
                      type: string
                      example: '10'
                      description: Number of orders resting at this level.
    dropcopy:
      payload:
        type: object
        description: >-
          Order drop copy message containing order state information. This
          channel requires authentication - unauthenticated subscription
          requests will be rejected.
        properties:
          seqnum:
            type: string
            description: Per-connection sequence number for the DROPCOPY channel.
            example: '42'
          channel:
            type: string
            description: Channel this message originated from.
            enum:
              - DROPCOPY
            example: DROPCOPY
          update:
            type: string
            description: >-
              Type of update for the current message. SNAPSHOT is sent upon
              initial subscription with all active orders. UPDATE is sent for
              subsequent order state changes.
            enum:
              - SNAPSHOT
              - UPDATE
            example: UPDATE
          data:
            type: object
            description: Order data representing the current state of an order.
            properties:
              order_id:
                type: string
                example: '987654321'
                description: Exchange assigned unique identifier for the order.
              client_id:
                type: string
                example: '12345'
                description: Client ID that owns this order.
              instrument_id:
                type: string
                example: '111222333'
                description: Exchange assigned ID of the instrument being traded.
              external_id:
                type: string
                example: my-order-001
                description: Client-supplied external order identifier.
              symbol:
                type: string
                maxLength: 31
                example: BTC-PYUSD
                description: Human readable representation of the instrument.
              side:
                type: string
                enum:
                  - BUY
                  - SELL
                example: BUY
                description: Order side.
              order_type:
                type: string
                enum:
                  - LIMIT
                  - MARKET
                  - NOTIONAL_LIMIT
                example: LIMIT
                description: Type of order.
              time_in_force:
                type: string
                enum:
                  - GTC
                  - IOC
                example: GTC
                description: Time in force for the order.
              status:
                type: string
                enum:
                  - NEW_PENDING
                  - ACTIVE
                  - FILLED
                  - CANCEL_PENDING
                  - CANCELED
                  - MODIFY_PENDING
                  - REJECTED
                example: ACTIVE
                description: Current state of the order.
              price:
                type: string
                example: '50000.00'
                description: Order price (for limit orders).
              quantity:
                type: string
                example: '1.5'
                description: Original order quantity.
              leaves_qty:
                type: string
                example: '1.0'
                description: Remaining quantity to be filled.
              executed_qty:
                type: string
                example: '0.5'
                description: Total quantity that has been executed.
              executed_vwap:
                type: string
                example: '49500.00'
                description: Volume weighted average price of executed quantity.
              event_type:
                type: string
                enum:
                  - NEW
                  - TRADE
                  - CANCELED
                  - MODIFIED
                  - REJECTED
                example: TRADE
                description: >-
                  Type of event that triggered this update (only present on
                  UPDATE messages).
              trade_price:
                type: string
                example: '50000.00'
                description: Price of the last trade (only present on TRADE events).
              trade_qty:
                type: string
                example: '0.5'
                description: Quantity of the last trade (only present on TRADE events).
              timestamp:
                type: string
                example: '1737469200000000'
                description: UTC Unix timestamp in nanoseconds when the event occurred.
  securitySchemes:
    NONE:
      type: httpApiKey
      in: query
      name: x-no-auth
      description: >
        This security scheme documents message-level behavior. Authentication
        fields are carried in the subscription message payload, not as HTTP
        query parameters.


        Clients may subscribe to endpoints without an API key or computing an
        HMAC signature. These endpoints are rate limited by the server,
        coalescing and only sending data at a predetermined rate.
        Non-authenticated connections can be upgraded by supplying an API key
        and computed HMAC signature on the next request sent to the server.


        Unauthenticated requests must have type `SUBSCRIBE_NO_AUTH` or
        `UNSUBSCRIBE_NO_AUTH` and must not include the following fields in the
        request: `organization_id`, `key`, `signature`.


        `*_NO_AUTH` requests are only valid on unauthenticated sessions. If a
        connection is already authenticated, no-auth requests are rejected and
        do not modify authenticated subscriptions.


        ### Required members
          * `timestamp`: A UTC Unix epoch in seconds.
    HMAC:
      type: httpApiKey
      in: query
      name: x-api-key
      description: >
        This security scheme documents message-level behavior. Authentication
        fields are carried in the subscription message payload, not as HTTP
        query parameters.


        Clients must compute and send an HMAC signature in the `signature`
        member of the request structure.


        Compute the payload exactly as:


        `timestamp + TRUEXWS + key + path`


        Then compute the signature as:


        `Base64( HMAC_SHA256(secret, payload) )`


        Rules:

        * `timestamp` is a Unix epoch in **seconds**.

        * `TRUEXWS` is the literal string `TRUEXWS`.

        * `key` is the API key UUID string.

        * `path` is everything after the domain, including leading `/` (e.g.
        `/api/v1`).

        * Timestamp must not be in the future and must be no older than 15
        seconds relative to server time.


        Example payload:

        * `1700000000TRUEXWS11112222-3333-4444-8555-666677778888/api/v1`


        Example signature (shell):

        * `printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$SECRET" -binary
        | base64`


        ### Required members

        * `signature`: The signature generated from processing the payload with
        the HMAC key.

        * `key`: The ID of the HMAC key being used.

        * `timestamp`: A UTC Unix epoch in seconds.
